swatisonee Posted August 7, 2008 Share Posted August 7, 2008 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 More sharing options...
ratcateme Posted August 7, 2008 Share Posted August 7, 2008 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. Link to comment https://forums.phpfreaks.com/topic/118587-tz-varies-from-actual-local-time/#findComment-610502 Share on other sites More sharing options...
swatisonee Posted August 8, 2008 Author Share Posted August 8, 2008 How can updating the OS solve the issue? The web users are all over the place and we cannot update each individual OS just because one TZ is out of sync. Could someone tell me where the TZ picks up its time records from ? Link to comment https://forums.phpfreaks.com/topic/118587-tz-varies-from-actual-local-time/#findComment-611444 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.