Forums > MaxMSP

cross-platform inconsistencies with [date] & [mxj now]

January 11, 2009 | 5:10 am

This is one for the c74 staff primarily.

Max 5:
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.

cheers,
T


January 11, 2009 | 11:31 am

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?

– N.

Nick Rothwell / Cassiel.com Limited
http://www.cassiel.com
http://www.myspace.com/cassieldotcom
http://www.last.fm/music/cassiel
http://www.reverbnation.com/cassiel
http://www.linkedin.com/in/cassiel
http://www.loadbang.net


January 11, 2009 | 2:00 pm

> [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."
its at:

http://code.google.com/android/reference/java/util/SimpleTimeZone.html

so it is do-able, but I don’t feel like learning java right now…


January 13, 2009 | 5:14 am

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.

T


January 13, 2009 | 7:55 pm

I can confirm the [date] issue, will take a look.

-Ben


Viewing 5 posts - 1 through 5 (of 5 total)