Timezones and DST

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Leandro-AL
Forum Newbie
Posts: 23
Joined: Thu Sep 04, 2008 10:05 am
Location: Albania

Timezones and DST

Post by Leandro-AL »

Hi all!

I'm trying to write a "last login" message in my login script. The plan is to store dates in the database with UTC_TIMESTAMP and then show them back to the user with CONVERT_TZ, using each user's specified timezone (they have set that on registration).

However here lies the problem of DST (daylight savings time). Somewhere i read that if you use named timezones eg. Europe/Rome, you need not worry about daylight savings. Is that true?

If not, is there a recommended way of doing this (even with PHP) without having to worry about DST?

Thanks,
Leandro
Post Reply