I have a guestbook which uses a database. I live in Sweden, but my guestbook is on a Brittish server. That makes 1 hour difference. I would like to convert the date and time to the Swedish time zone before it is stored in the database.
A better idea would be to convert it to GMT, in case you change hosting providers and you end up hosting in the US, or even in sweden..
http://www.php.net/manual/en/function.gmdate.php
Of course, you also have to consider - where is the person signing the guest book?
-Ben
Hmm, thanks. Just what I was looking for. Then I just can use gmdate +1 hour.
Thanks!
That's also an idea. But this site is all in Swedish, and will almost only have Swedish visitors.
But how would I check the visitors time zone if I wanted to then?