Re: Upgrading to internal DateTime
| From: | Paweł Stradomski | Date: | Wed, 10 Dec 2008 10:27:18 +0000 |
| Subject: | Re: Upgrading to internal DateTime | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42212@lists.php.net to get a copy of this message | ||
W liście Jonathan Bond-Caron z dnia wtorek 09 grudnia 2008:
> Unix timestamps are simpler since you know they are always in UTC.
>
> Just thought I'd raise that there's nothing wrong with storing all dates as
> ISO in a given timezone. It takes a little more work but if your
> consistent, it can managed.
>
> If I'm wrong, please let me know :)
It's not really feasible to store dates in specific timezone, as most
national/local timezones support DST - and that is a pain to support, as eg.
sorting breaks when some timestamps get repeated. That's why it's usually
better to store datetimes as either UTC datetime or plain unix timestamp. I
usually go with the former - using database datetime type.
--
Paweł Stradomski