Mail Archives: djgpp/2001/01/11/10:21:34
Joe Wright <joewwright AT earthlink DOT net> wrote:
> Is there some setup thing such that localtime() reports the system
> clock, tm_zone is "EST" and gmtime() is five hours later?
set 'TZ' --> see Eli's reply.
> Do you know why...
[...]
> - tm_mday is the only rel-1 value in struct tm. All others are rel-0.
In a nutshell, all fields except tm_month keep their normal, everyday
numerical definition, which already is zero-based. tm_month and
tm_wday are the exceptions, because they will often be used as an
index in an array of names and arrays are zero-based in C. tm_mday is
a purely numerical value, so there's no point changing it's every day
one-based counting to zero-based.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -