View Full Version : date time problem
01-20-2012, 08:10 AM
echo date("H:i:s",$_SERVER['REQUEST_TIME']); // 17:30
but my computer time is 18:30 . why result of code is wrong ?
01-20-2012, 12:59 PM
Is it a private server or shared server? Because if you request the server time, it's going to be the time where the server is located. Such as I live in Virginia and my server is in another timezone, so it's a one hour difference.
01-20-2012, 01:33 PM
You can specify the timezone you want at the beginning of your script.
The rest of the script will then use your timezone for all date and time calculations.
Here is a list of valid city names:
Pick the city that is in your timezone.
And this is nice because it automatically adjusts standard and daylight savings times.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.