<HEAD><TITLE>discuss@charon: [1034] in "Coldmud discussion meeting"</TITLE>
<H1>[1034] in Coldmud discussion meeting</H1></HEAD>
<A HREF="/"><IMG SRC="/i-d.gif" ALT="root"></A>
<A HREF="?1034"><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>
<A HREF="1032"><IMG SRC="/i-fref.gif" ALT="first in chain"></A>
<A HREF="1033"><IMG SRC="/i-pref.gif" ALT="previous in chain"></A>
<A HREF="1033"><IMG SRC="/i-prev.gif" ALT="previous"></A>
<A HREF="1035"><IMG SRC="/i-next.gif" ALT="next"></A>
<A HREF="1035"><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>Re: [COLD] behaviour of localtime()</H2>
<H3>daemon@ATHENA.MIT.EDU (Tue Jul 23 14:06:12 1996
)</H3>
<PRE>
From: Andrew Wilson &lt;andrew@aaaaaaaa.demon.co.uk&gt;
To: Brandon Gillespie &lt;brandon@tombstone.sunrem.com&gt;
Date: Tue, 23 Jul 1996 17:14:07 +0100 (BST)
Cc: coldstuff@cold.org
In-Reply-To: &lt;Pine.BSF.3.91.960723091352.19109A-100000@tombstone.sunrem.com&gt; from "Brandon Gillespie" at Jul 23, 96 09:18:43 am

&gt; Right now localtime works like:
&gt; 
&gt;     1. INTEGER time (same as returned by the function time()) 
&gt;     2. INTEGER seconds (0-59) 
&gt;     3. INTEGER minutes (0-59) 

[snippety...]

&gt; Which is basically a raw dump of the C function localtime().  Because 
&gt; Cold scales arrays starting at one rather than zero, I think I will change 
&gt; it to add one to elements 2 - 9 (excluding the year and day of the month), 
&gt; instead giving you:
&gt; 
&gt;     1. INTEGER time (same as returned by the function time())
&gt;     2. INTEGER seconds (1-60)
&gt;     3. INTEGER minutes (1-60)

[snip...]

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

What is this, April 1st?  Under this proposal I'll be forced to
subtract one from seconds and minutes to get the right answer?  I
think, on general principal, that you shouldn't dick with something
so important as localtime(), you'll be up to your ass in FAQ 'er
why is cold's time code not standard C, why is it always off by
one, is my system misconfigured?!?!' and other perfectly sensible
bemusement.

&gt; -Brandon Gillespie

Ay.
</PRE>
