Archive

Archive for July, 2009

Java and DST (daylight saving time)

Java uses time zone to mark a time that is relative to a DST period.
This is important in system integration. E.g. I have a system1 sending an xml file containing a date to another system2, these systems are located in the same country (having the same time zone).
Say that system2 parses the xml date ignoring its time zone, this could be a problem if the xml will be sent before DST and will be received during DST.
So: 14:00 +1 (before DST) is 14:00 +2 (during DST) and not 15:00 +1! If system2 parses the date without using the time zone it will remain 14:00 and will not became 15:00.

Advertisements
Categories: Uncategorized