php time 2 hours wrong for only 50% some users

Posted by user1797802 on Stack Overflow See other posts from Stack Overflow or by user1797802
Published on 2012-11-04T09:54:19Z Indexed on 2012/11/04 11:00 UTC
Read the original article Hit count: 138

Filed under:

I am having huge issues with php time.

For some reason it shows a different time (by 2 hours) to some users and the correct time to other users.

The code is H:i:s d-M-y T when I view the page in a browser from my PC it tells me its 11am when infact its 9am, when I check via a browser using one my RDP's I get the correct time.

Both PC's are in the country (uk) both PC's have the same system time etc.

Tried setting the timezone default, but no matter what I do the server still shows some users the correct time, and other users the time 2 hour forward, any ideas?

the code is echo gmdate("H:i:s d-M-y T");

<?php echo gmdate("H:i:s d-M-y T"); ?>

© Stack Overflow or respective owner

Related posts about php