File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DayLight Savings time TO CST conversion

 
Avanish Raut
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Ranch Hand
Posts: 621
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic