Date Help

Notices and updates
Locked
jeremyc
Posts: 33
Joined: Wed Dec 06, 2006 3:33 am

Date Help

Post by jeremyc »

Can someone help me out here?

Code: Select all

> (date (date-value 2006 1 1))
"Sat Dec 31 19:00:00 2005"
I am assuming this has to do with timezone? Reading the docs thought, it seems like the date functions assume the time is UTC and only makes conversion, say, when adding the minutes offset on the call to date?

Jeremy

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

The 'date-value' function returns an UTC value, but 'date' formats this number for your current timezone which seem to be 5 hours west of GMT, probably EST (eastern standard time).

'date' will always make the conversion to the local timezone +- the offset given as optional parameter in minutes.

Lutz

ps: version 9.0.7 is ready here:

http://newlisp.org/downloads/development/

Locked