cross-platform inconsistencies with [date] & [mxj now]
This is one for the c74 staff primarily.
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.
On 11 Jan 2009, at 05:10, Terry McDermott wrote:
> [mxj now] reports the local time, but without accounting for
> daylight savings.
[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?
Nick Rothwell / Cassiel.com Limited
> [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."
so it is do-able, but I don’t feel like learning java right now…
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…
So, if in doubt, reboot I guess.
I can confirm the [date] issue, will take a look.
Forums > MaxMSP