<HEAD><TITLE>discuss@charon: [1032] in "Coldmud discussion meeting"</TITLE>
<H1>[1032] in Coldmud discussion meeting</H1></HEAD>
<A HREF="/"><IMG SRC="/i-d.gif" ALT="root"></A>
<A HREF="?1032"><IMG SRC="/i-back.gif" ALT="meeting"></A>
<A HREF="/help.html"><IMG SRC="/i-help.gif" ALT="help"></A>
<A HREF="1"><IMG SRC="/i-first.gif" ALT="first"></A>
<IMG SRC="/n-fref.gif" ALT="">
<IMG SRC="/n-pref.gif" ALT="">
<A HREF="1031"><IMG SRC="/i-prev.gif" ALT="previous"></A>
<A HREF="1033"><IMG SRC="/i-next.gif" ALT="next"></A>
<A HREF="1033"><IMG SRC="/i-nref.gif" ALT="next in chain"></A>
<A HREF="1036"><IMG SRC="/i-lref.gif" ALT="last in chain"></A>
<A HREF="1641"><IMG SRC="/i-last.gif" ALT="last"></A>
<HR><H2>[COLD] behaviour of localtime()</H2>
<H3>daemon@ATHENA.MIT.EDU (Tue Jul 23 12:00:12 1996
)</H3>
<PRE>
Date: Tue, 23 Jul 1996 09:18:43 -0600 (MDT)
From: Brandon Gillespie &lt;brandon@tombstone.sunrem.com&gt;
To: coldstuff@cold.org


Right now localtime works like:

    1. INTEGER time (same as returned by the function time()) 
    2. INTEGER seconds (0-59) 
    3. INTEGER minutes (0-59) 
    4. INTEGER hours (0-23)) 
    5. INTEGER day of month (1-31) 
    6. INTEGER month in year (0-11) 
    7. INTEGER year 
    8. INTEGER week day (0-6) 
    9. INTEGER year day (0-365) 
   10. INTEGER is daylight savings in effect? 
   11. STRING time zone name 

Which is basically a raw dump of the C function localtime().  Because 
Cold scales arrays starting at one rather than zero, I think I will change 
it to add one to elements 2 - 9 (excluding the year and day of the month), 
instead giving you:

    1. INTEGER time (same as returned by the function time())
    2. INTEGER seconds (1-60)
    3. INTEGER minutes (1-60)
    4. INTEGER hours (1-24)
    5. INTEGER day of month (1-32)
    6. INTEGER month in year (1-12)
    7. INTEGER year
    8. INTEGER week day (1-7, Sunday=1)
    9. INTEGER year day (1-366)
   10. INTEGER is daylight savings in effect?
   11. STRING time zone name

The reason for this is any likely use of localtime() in ColdC will 
inevitably require you to add one to the value, so why not do it in 
native code rather than interpreted code?

-Brandon Gillespie
</PRE>
