Jump to content

Local time zone in php 4?


python72

Recommended Posts

I am trying to get local date/time.

In my php file I am setting my timezone using

$timezone = "America/Toronto";
putenv ('TZ=' . $timezone);

Then I use the following to get current date and time

print_r (getdate());

but my date displays in GMT,

What am I doing wrong? As in the code above I am in Toronto and I need EST.

Link to comment
https://forums.phpfreaks.com/topic/219959-local-time-zone-in-php-4/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.