Re: Local time zone
| From: | Derick Rethans | Date: | Tue, 20 Dec 2011 11:29:44 +0000 |
| Subject: | Re: Local time zone | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56962@lists.php.net to get a copy of this message | ||
On Wed, 14 Dec 2011, Ángel González wrote:
> On 14/12/11 22:53, Will Fitch wrote:
>
> > I believe he's referring to sys/time.h, but this introduces
> > portability issues. If it were just unix, that would be one thing.
> > But maintaining this and a Windows alternative, and I have no idea
> > what that is, is not worth it IMO.
>
> <time.h> is present in *nix, Windows, and probably everywhere php
> runs. As it provides mktime/gmtime/localtime, it should be possible to
> portably deal with timezones. At least when it's not multithreaded.
> And if the host doesn't contain timezone data (embedded systems,
> perhaps), that "System" zone could simply default to UTC.
PHP's date time support does not use time.h. With one of the reasons is
that time_t is 32bit on most Unices, and we need to support things
outside that range too.
Derick
--
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug