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

Re: [MiNT] timezone change



Guido said:
> And Minix and Ext2 wants RTC = UTC.  So do all standard library functions

no, they just want the data in UTC. They dont care what the RTC says, since
they dont (shouldnt) directly query it.

> Is it really that hard to understand?

It appears so.

> Unix UTC timestamps are simply an
> integer number (the number of seconds since Jan 1, 1970, 0:00 UTC).
> GEMDOS timestamps are broken-down (i. e. hour, minute, second, day, month,
> year are all stored in a separate integer value).  Arithmetics on Unix

Who says localtime needs to be stored in that format?

why not simply store localtime in the same standard time_t format of seconds
since 1 Jan 1970 or whenever it is, just simply do it in LOCAL TIME rather
than in GMT.

Ie, to convert from BST (British Summer Time, GMT +1) to UTC is a simple
addition of 3600 (60 minutes of 60 seconds). The kernel can store this
offset calculated whenever told that the localtime has been changed via some
OS call (eg by your timezone database program) and make all your "extremely
difficult" LT -> UTC conversions extremely simple.

I really dont see any problem with keeping the RTC in localtime and
converting to UTC for internal use.

> Besides, you don't want to get ruled by those dudes that live in Greenwich
> near London (btw, Portugal, Eire and West Africa are mostly the same
> timezone as the UK).  But there are many countries in this world that

Greenwich, like the rest of the UK is on BST now, so is GMT + 1. IIRC there
is somewhere in the world which doesnt have summertime that is also in the
greenwich meridian, but certainly the UK is not currently in GMT.

Anthony
8<- - - - - - -
Domination-Q3: http://www.planetquake.com/domination
EraserULTRA:  http://ultra.quake2.co.uk
Email:                AnthonyJ@jacquesa.freeserve.co.uk