Quick background. We receive data with different timestamps. The easiest way to work with the data is to use SimpleDateFormat and work with Date. Date holds a reference to the date as number of milliseconds since the Epoch (Jan 1 1970).
For some reason our suppliers give us formated dates form different timezones. No problem we just set the dateformatter to use a different timezone when parsing the date string. The API doc states that it "also figures out daylight savings". However it does not state that you must use the long code ("Europe/London") for the timezone and not the 3 letter code ("GMT"). List of short codes. Now we are using the long code we are getting the correct dates with daylight savings taken account of.
No comments:
Post a Comment