Jump to content

TZ varies from actual local time


swatisonee

Recommended Posts

Strange issue .

 

I'm using the foll. code but the time it indicates is about 7-8 mins faster than the current local standard time. Any idea how I could rectify this ?

 

 

$date = putenv('TZ=Asia/Calcutta');
// $date = putenv('TZ=Asia/Katmandu'); // tried this  option too
   
mktime(0,0,0,1,1,1970) ;
  echo '<p align="center">  ';

// displays 07-08-2008 14:02:44  when the actual local time is 07-08-2008 13:55:44 

Link to comment
https://forums.phpfreaks.com/topic/118587-tz-varies-from-actual-local-time/
Share on other sites

i would suggest you would want to set it in the OS rather than trying to fix it in PHP as seeing that the time is out by like 8 mins then it is proberly going to get further out so updating the OS time would probably be better.

 

Scott.

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.