[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TZ and MINT
Hi Andreas Schwab, Jens M Felderhoff
Last year I posted here a diff archive for POSIX time (esp. TZ rules) in
mintlib, to patch libsrc PL46.
Further I made some proposals for a gettimeofday funtion and TOS
compatible time handling in MiNT, but no one seemed interested.
So my MiNT system is running with UTC time now, therefore I also patched the
time() function from mintlib (replacing the mktime() call with the _unixtim()
function from MiNT sources).
Of course this works only on machines running the clock with UTC time. And
of course you have to recompile all programs using local time (date, ls,
mailers, etc).
To make it portable at least I suggest a clock cookie:
'CLOC' 'clock_cookie_value' where the upper 8 bits in clock_cookie_value
are a bitfield:
if == 0 or doesn't exist: clock is (Tgettime/date returns) local time + DST
according TZ environment variable
00000001 clock is UTC time
00000010 Tgettimeofday() function and unxitime variable
available, returns (only) timeval struct
00000110 Tgettimeofday() function returns also timezone
Tgettimeofday() of course returns always UTC time in seconds since 1970
If this cookie doesn't exist when MiNT starts up it creates it according to its
time capabilities, if it exists MiNT changes it accordingly.
--
jerry
jerry@merlin.abacus.de jerry@zedat.fu-berlin.de
- References:
- Re: TZ and MINT
- From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>