Datetime oddness on Pixl.js (or Web IDE?)

Posted on
  • I have the usual "set current time" toggle enabled in the WebIDE. But Date on the Pixl is giving me this weird :

    Fri May 25 2018 07:35:09 GMT-6000
    

    when it's actually Sunday at 20:35 BST

    I did

    setTime(Date.parse("2018-05-27T20:35:10"­) / 1000);
    

    so the time is now right. But it's still printing out GMT-6000.

    Am I missing something blindingly obvious?

    (Windows 10 standalone Web IDE from last week. Pixl on both 1v97 and 1v99).

  • Try E.setTimeZone() to correct the time zone.

  • Thanks @MaBe. That worked. But I've no idea where that GMT-6000 came from.

  • Hi Conor, what IDE are you using for it? Older IDEs had a problem with how they called E.setTimeZone() so they set the time up wrong (by a factor of -60!) on anything with a nonzero timezone.

    Sounds like your issue as Friday looks ~60 hours before Sunday?

    All the other IDEs should have auto-updated but the windows Native one won't have.

  • That sounds like the problem alright Gordon :-)

    I thought I'd grabbed the latest standalone for Windows last week but maybe I followed a stale link. It's reporting 0.68.6 in About.

    Just updated to 0.69.0 and all seems well again.

  • I only updated it last week, so it was probably just bad timing!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Datetime oddness on Pixl.js (or Web IDE?)

Posted by Avatar for ConorONeill @ConorONeill

Actions