Page 1 of 1

Date Help

Posted: Wed Dec 06, 2006 11:40 pm
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

Posted: Wed Dec 06, 2006 11:52 pm
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/