RE: [PHP] Slick Time Zone Coversions
| From: | Don Read | Date: | Thu, 21 Jun 2001 17:56:31 +0000 |
| Subject: | RE: [PHP] Slick Time Zone Coversions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-54778@lists.php.net to get a copy of this message | ||
On 20-Jun-01 Jason wrote:
> Hey,
>
> I wanted to see if anybody has a some ideas or code for a good time zone
> coversion function.
>
> Basically, I would like something where the user can input their timezone
> (or if php doesn't recognize timezones, maybe just the current time for
> them, and it can caluculate the difference, but timezones would be
> preferred). They then enter a time (hh:mm am/pm) which is not local to them,
> and the function will output a time that has been converted to their
> timezone.
>
putenv("TZ=CST6CDT");
$tm=mktime( ...
putenv("$TZ=PST8PDT");
echo date('Y-m-d h:i', $tz);
> Basically i just want users to be able to take a non-local time and get the
> local time in their timezone with it. This will be for US times only also.
>
> Thanks a bunch!
>
Regards,
--
Don Read dread@texas.net
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.