I've just come across a rather strange issue using java.util.Date on Android.
I'm declaring a a date object like so:
Date d = new Date(32400000);
The number value represents 9 hours in milliseconds.
Calling the following code should then output "09:00" to the debug logs.
DateFormat dateFormat = new SimpleDateFormat("HH:mm");
On my home machine (Linux x64, eclipse galileo, android sdk r3, build for android 1.6) this code works fine.
On my university machine (Windows XP x86, eclipse galileo, android sdk r3, build for android 1.6) the output is one hour later - "10:00"
As this is only a uni project I'm not too bothered, more intrigued!
Can anyone offer any insight as to why this happens?
If I change the date declaration to Date d = new Date(28800000); the same thing happens, my home machine shows 08:00, uni shows 09:00!!
I look forward to hearing from you.