Bugreport (maybe?) - Javascript Date GMT issue.


    Jan 08 2007 | 10:43 pm
    Hello
    I have posted this knowingly in the wrong forum because the webforum (I am not subscribed to the JS forum via mail) has continuously eaten my messages on Safari - and I do not want to punch a hole through my Macbook Pro. Apologies to the admin but I refuse to battle the forum and risk an aneurism.
    Anyway: ------
    Hello. I am uncertain if I am doing something wrong, misunderstanding some basics, or have found a bug.
    If I have the javascript within Max 4.6.2 :
    function now() { rightnow = new Date();
    post(rightnow.toString(), "nr");
    }
    this returns within the max console:
    Sun Jan 07 2007 17:32:53 GMT+1445 EDT
    which is wrong for my time - it should return
    Mon Jan 08 2007 17:32:53 GMT-0500
    as per Safari with the following URL: http://www.w3schools.com/jsref/ tryit.asp?filename=tryjsref_tostring
    You can test side by side. Ive also attempted to use the functions included within the javascript core such as getTimezoneOffset etc, to no avail.
    Where is + 1445 coming from? Is there anything I can do to fix this? Is this user error or a bug? Thanks, and apologies for knowingly posting to the wrong forum, feel free to spank me.
    v a d e //
    www.vade.info abstrakt.vade.info

    • Jan 08 2007 | 11:23 pm
      I can verify (though for me is +1441). It seems like it might be some sort of endian issue on MBP with the version of the spidermonkey JS implementation we're using, and will certainly not be fixed before Max 5. Perhaps you can figure out a workaround in the meantime.
      -Joshua
    • Jan 09 2007 | 12:44 am
      Ill see what I can come up with as far as workarounds, I was just super confused why dates seemed to be a day off, and where the hell that number came from. Ill test on a PPC machine when I get a spare moment to see if its an endian issue.
      Thanks for the quick response on this - it is appreciated.
      Is there a way to report this bug to the Spidermonkey JS developers?
      P.S. Apologies for the goof-ball-iness - the forum drives me nuts, and I cant contain myself ...
      On Jan 8, 2007, at 6:23 PM, Joshua Kit Clayton wrote:
      > > I can verify (though for me is +1441). It seems like it might be > some sort of endian issue on MBP with the version of the > spidermonkey JS implementation we're using, and will certainly not > be fixed before Max 5. Perhaps you can figure out a workaround in > the meantime. > > -Joshua
      v a d e //
      www.vade.info abstrakt.vade.info
    • Jan 09 2007 | 1:01 am
      On Jan 8, 2007, at 4:44 PM, vade wrote:
      > Is there a way to report this bug to the Spidermonkey JS developers?
      If you can reproduce with UB Firefox or Mozilla, then I'd say report it there, but in all likelihood, it's been fixed already in the Spidermonkey source. We haven't updated to the Javascript 1.6 implementation of Spidermonkey, and probably won't until Max 5 at the earliest.
      Best, Joshua