Re: Re: User Timezone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 21, 2012 at 6:18 PM, Karl DeSaulniers <karl@xxxxxxxxxxxxxxx> wrote:
> On Oct 21, 2012, at 5:11 PM, tamouse mailing lists wrote:
>> Using the standard labels in /usr/share/zoneinfo should be able to
>> avoid having to keep track of who is and isn't in DST, *provided* you
>> find a way to map the user's address to one of those files.
>
> I am not familiar with this. Can you elaborate?

/usr/share/zoneinfo contains the time zone information in files and
subdirectories such as:

GMT
PST8PDT
America/Chicago
America/Los_Angeles
Europe/London
Europe/Rome

and so on, for all the various time zones.

You can use these names as strings in most time zone functions that
accept a time zone.

PHP knows about these; you'll find more info at
http://us1.php.net/manual/en/timezones.php

This doesn't help with the original question, finding out which time
zone a user is in, but once you find out, using the canonical names
will be useful without directly having to know if/when a particular
zone is in DST or not. You should never (ever!) have to deal with the
contents of these files; they contain binary data that is used in the
system to deal with figuring out that sort of thing.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux