jQuery in Action, 2nd edition*
The moose likes Java in General and the fly likes DayLight Savings time TO CST conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "DayLight Savings time TO CST conversion" Watch "DayLight Savings time TO CST conversion" New topic

DayLight Savings time TO CST conversion

Avanish Raut

Joined: Feb 20, 2001
Posts: 4
I am converting daylight savings time to Central Standard time. I tried using TimeZone and SimpleTimeZone but when I get the date in java.util.Date format it automatically reduces 1 hour if the date passed is switchOver date i.e. First Sunday of April at 0200 Hrs.

Sean MacLean
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
This is a bit hacky but you could simply query the timezone using the isDalightTime( Date date ) to see if it's adding an hour and then adjust accrdingly.
I agree. Here's the link: http://aspose.com/file-tools
subject: DayLight Savings time TO CST conversion
Similar Threads
Converting a date object from GMT to EST
HELP: Daylight Savings in Java
How to get java Date with Daylight savings
Timezone - PST and PDT
Date/Time conversion to GMT with DayLightSavings