[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Time patch -- let's talk about it.

> On Fri, 20 Jun 1997, Petr Stehlik wrote:
> > Maybe I didn't understand the patch fully again, but my objection is 
> > simple: most of us use the local time on our machines, I think. Will the 
> > patched pl47 return the correct local time _without_ setting an env. 
> > variable?
My question is how do you deal with DST? and what about time zones??

On Fri, 20 Jun 1997, Yves Pelletier wrote:
> My understanding of it is as follows:
> 1. If you have a standalone MiNT box, and you wish to work in
> local time, just set the internal clock to local time and be
> happy.
> 2. If you have to work in coordination with other machines, or
> want your machine hooked up to a network (possibly through NFS)
> then it quickly becomes important that all machines working
> together keep time in the same manner.  Then you might want to
> have UTC as the basic time standard for your MiNT box's internal
> clock.  Jerry's patch increases the MiNTlib's time routine's
> ability to cope with that kind of environment.
I proposed a TIME cookie which tells the library the time the clock
is running with. (i.e. UTC, local time (with or without DST))

The cookie will further have some bits to tell the library which time()
functions are available -- this is another discussion :-) -- I know.

According to this information the lib will calculate or just get UTC time 
from the OS. btw: If you are running your machine with local time you should 
have set the TZ env variable including DST information, cause ... 

But no one answered, so I thought most MiNT users don't care about time at all.
That seems changed now:

For portable binaries (libs, programs) we need 
1. a TIME cookie to tell the library the machine clock's time
2. standard time routines (BSD or GNUlib localtime.c) i.e. my last year's time
3. At least another patch to the lib's time.c - checking for the cookie:
   local or UTC time - maybe more (is Tgettimeofday() available? ...)

        jerry@merlin.abacus.de          jerry@zedat.fu-berlin.de