X-TechMedia
06-10-2003, 07:21 AM
One of our users has reported that the time isnt correct on our sever, but when I checked it, it was showing the right time.
Seems that the problem is only when trying to write a file using PHP, it puts the creatin time an hour behind what it should be.
Is there a time setting for PHP? I looked in php.ini, but couldnt find anything.
Anyone had this before?
nainil
06-10-2003, 07:50 AM
I think your locale is something wrong. For example, my RedHat7/J does not have JST, but has Japan, for some reason. I had to copy Japan locale as JST to make it work for the correct time.
Nainil
whitecollar
06-10-2003, 07:56 AM
Hi Benny,
You can manipulate the time shown to an hour ahead with php's date() function.
Excellent examples are provided in the comments section here:
http://www.php.net/manual/en/function.date.php
If you can paste here the exact php code you are using to print the time, I can tell you what to add or change so it displays the time you want.
Regards,
Matt
X-TechMedia
06-10-2003, 09:28 AM
Its not displaying the time using PHP, its when using the fwrite() command, the timestamp on the actual file is an hour behind the actual time on the server.
Thats why I thought it might be php.ini.
So it could be to do with Redhat rather than cpanel?
robinbalen
06-10-2003, 01:22 PM
Sounds like it's a OS issue rather than a PHP/Cpanel issue. Try changing the timezone that the server is set-up in.