aspose file tools*
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
JavaRanch » Java Forums » Java » Java in General
Bookmark "DayLight Savings time TO CST conversion" Watch "DayLight Savings time TO CST conversion" New topic
Author

DayLight Savings time TO CST conversion

Avanish Raut
Greenhorn

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.


Ava
Sean MacLean
author
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.
Sean
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DayLight Savings time TO CST conversion