Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3849396
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:50:54+00:00 2026-05-19T16:50:54+00:00

what is the joda-time equivalent of below methods in JDK. TimeZone.getOffset() TimeZone.getRawOffset() TimeZone.inDaylightTime() TimeZone.useDaylightTime()

  • 0

what is the joda-time equivalent of below methods in JDK.

  1. TimeZone.getOffset()
  2. TimeZone.getRawOffset()
  3. TimeZone.inDaylightTime()
  4. TimeZone.useDaylightTime()
  5. TimeZone.getDSTSavings()

My main idea is to store the below in database as suggested by most of the SO posts

  1. time in UTC = joda Instant
  2. time zone offset = which is the equivalent in joda?
  3. dst offset = which is the equivalent in joda?

Also should i store the RawOffset or the DST adjusted offset?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T16:50:55+00:00Added an answer on May 19, 2026 at 4:50 pm
    1. DateTimeZone.getOffset()
    2. DateTimeZone.getStandardOffset()
    3. ! DateTimeZone.isStandardOffset()
    4. ! DateTimeZone.isFixed()
    5. Not sure.

    If you just save the UTC instant and the timezone id (i.e. America/New York and Europe/London, not EST and GMT) then you don’t need to worry about storing raw offsets. Especially as offsets change with annoying frequency. Let Joda and the tz database do all the work for you. So store:

    1. ReadableInstant.getMillis()
    2. DateTimeZone.getId()

    With Java 8, just use ZonedDateTime persisted via DateTimeFormatter.ISO_ZONED_DATE_TIME.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Equivalent of following methods in Joda-Time DateFormatSymbols #getMonths() /** * Gets month strings. For
Joda-Time library includes different datetime classes DateTime - Immutable replacement for JDK Calendar DateMidnight
The code below demonstrates the problematic joda-time implementation of week calculation. This behavior is
I'm using the Joda time (1.6) libraries and it keeps returning DateTime objects with
I'm considering using Joda-Time . I'm wondering if I should pay attention of what
I want to try out Joda Time with Play Framework 2.0. So I have
I want to convince the architecture manager to include the Joda-Time jar in our
My time zone is CET (Berlin). And while testing Joda's DateTime i noticed some
I'm trying to have Joda print 0 seconds if the input time is zero,
In Joda-Time 2, what is the difference between the three kinds of time spans:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.