on a mac:
[date] reports the time correctly.
[mxj now] reports the time correctly.
on windows xp:
[date] reports greenwich mean time, no matter what the location you set on the ‘time’ control panel. Evidently [date] does not talk to the Windows API.
[mxj now] reports the local time, but without accounting for daylight savings.
I believe this inconsistency between platforms should be addressed, as it’s very annoying from a cross-platform development perspective. Although I guess nothing can be done about [mxj now], perhaps the [date] problem can be looked at.
> [mxj now] just does a Calendar.getInstance() and unpacks this, so its
> behaviour depends on the locale setting for the Java system. Is there
> some kind of Windows control panel for setting this?
> – N.
I found this documentation for the java.util.SimpleTimeZone class:
"SimpleTimeZone represents a local time zone and its daylight savings time rules for the gregorian calendar."
Just updating on my ‘problem’, the [mxj now] object now seems to be reliable observing daylight savings time, after shutting down the computer for the weekend and then reloading the same patch on Monday (this was on Windows xp).
So I don’t know why it wasn’t behaving last week… maybe it’s got something to do with Windows start up routine and initializing the jvm, dunno…