I still have not solved the issue about correcting for time difference
between server location and client location (also a newbie on php), so
any suggestions will be much appreciated.
As far as I know, this problem is very hard to resolve: the server doesn't know your own local time as a client.
The only way we could resolve this would be to use a Javascript once, so you get the clients local time, send it to the server, and compare it with the server local time.
But... even so, another _big_ problem would occur: this would have to be calculated for every client (or visitor) of the site. Because, of course, every visitor of the site would need it's own local time.
And even so, what would each webmaster prefer for it's own site:
- show (on the site) that a message has been sent at it's own local time (wich would be logical: if you're in Genoa-Italia right know, you want to date your message with the indication of local time, so that your testimony corresponds to the actual time of the event you discribe - "at noon the police shot a guy...");
- show the correspondance of time for the users local time (for an american visitor, would it be better to show that events occur at italian local time, or would it be better to indicate that it just happened in american time ("at five o'clock this morning, US West Coast time, the police shot...").
So... in anymay, the best thing is to save in the database with the servers local time. So that contributors all around the world would insert informations on the server with the same time schedule (after all, airline pilots work with absolute GMT times, wherever they are in the world). The SPIP system would then more easily order dates in an absolute manner (otherwise, an american contributor's message would seem to be posted before a european's contributor's message, if posted just a few hours later).
Then you can always add a special function to translate these dates to the clients local time, by combining javascript and PHP (eurk, that's always ugly...). Or a quite simple function adding or retrieving a certain number of hours so that the public site always shows time and date within your own time fuse (Stockholm?) for every visitor.
ARNO*
--
Le Scarabée : http://www.scarabee.com
uZine 2 : http://www.minirezo.net
DH/DSS, 0x11930F0B, DEEB 602D B344 644B AF88 BF73 85F4 2297 1193 0F0B