Thanks for your effort, but that's not UTC. And I really want a Date object, not a string.
On 10 mrt, 14:58, "Matthew Hazlett" <hazl...@gmail.com> wrote: > Then you can do it with date.format: > > http://mootools.net/shell/tfREh/ > > -----Original Message----- > From: mootools-users@googlegroups.com > > [mailto:mootools-us...@googlegroups.com] On Behalf Of woomla > Sent: Wednesday, March 10, 2010 3:43 AM > To: MooTools Users > Subject: [Moo] Re: Convert Date to and from UTC > > No, this gives me the UTC day. I don't need the day, I need the > complete UTC Date (year, month, day, hour, min, sec, msec). > > Example: > I receive this UTC date from the server: > 2010-03-10 08:39:12.123. > > I need to display it as local time. I.e on my system that is in GMT+1 > it should display: > 2010-03-10 09:39:12.123 > > I don't only need the string. I need the Date object to do other > calculations with it. > > So I'm really looking for a smart mootools way toUTC and toLocal or > something alike. > > On 9 mrt, 15:52, "Matthew Hazlett" <hazl...@gmail.com> wrote: > > date.get('UTCDate'); > > >http://mootools.net/docs/more/Native/Date > > > -----Original Message----- > > From: mootools-users@googlegroups.com > > > [mailto:mootools-us...@googlegroups.com] On Behalf Of woomla > > Sent: Tuesday, March 09, 2010 9:14 AM > > To: MooTools Users > > Subject: [Moo] Convert Date to and from UTC > > > Hi, > > > My server sends me a timestamp in UTC time. I want to check that > > against a new Date() object. Is there a mootools way to convert this > > new Date() object to UTC time? There is something like parseUTC > > (undocumented) and getGMTOffset, but I can't find a ready solution. > > > Thanks.,