Date and time help! |
[eluser]dmorin[/eluser]
Somewhere in your app, you should be setting your default timezone (http://php.net/manual/en/function.date-d...ne-set.php). If you are setting your default timezone to GMT+4, then any date you create will be in that format already. If you're setting it to something else, check out the DateTime Class (http://www.php.net/manual/en/class.datetime.php). When you instantiate the class, it'll be set to the current timezone. You can then use DateTime: ![]() Why don't you want to get the current date time from your server? If your server's clock is off, you should be syncing it with a time server to make sure it's correct, otherwise the timestamps in your logs will all be off also. |
Messages In This Thread |
Date and time help! - by El Forum - 02-23-2010, 11:04 AM
Date and time help! - by El Forum - 02-23-2010, 06:07 PM
Date and time help! - by El Forum - 02-24-2010, 02:09 AM
Date and time help! - by El Forum - 02-24-2010, 07:53 AM
Date and time help! - by El Forum - 02-24-2010, 11:30 AM
Date and time help! - by El Forum - 02-24-2010, 11:38 AM
Date and time help! - by El Forum - 02-24-2010, 11:45 AM
Date and time help! - by El Forum - 02-24-2010, 11:55 AM
Date and time help! - by El Forum - 02-24-2010, 12:14 PM
|