monkeytooth Posted April 3, 2010 Share Posted April 3, 2010 Well its not really an issue so much as just curiousity. time() thats based on the server time from the location the server is in etc right? What if I want to keep all my logs uniform to my timezone. Im in -5 (Eastern US/Canada) my server is -6 i dunno anyway its an hour behind me I wanna make my timestamps equivilant to my timezone.. most of my timestamps i convert to mysql timestamps yyyy-mm-dd hh:mm:ss format using date() and time() as the refrence for the timestamp.. Is this a bad idea to want to do this by the way, will if conflict with anything if i do it that way, should I just leave them as is and maybe just add an hour to the display of the stamps or should I store them the way I want to see them? ----------------- Being really tired, tempting to talk let alone code, bad idea!! bad.. I need coffee.. oooooOO look a blinky light!! Quote Link to comment https://forums.phpfreaks.com/topic/197445-incredibly-tired-need-help-with-timestamp-issues/ Share on other sites More sharing options...
Daniel0 Posted April 3, 2010 Share Posted April 3, 2010 Unix time is defined as being UTC. As for timezones, just change the date.timezone ini setting. Quote Link to comment https://forums.phpfreaks.com/topic/197445-incredibly-tired-need-help-with-timestamp-issues/#findComment-1036327 Share on other sites More sharing options...
ignace Posted April 3, 2010 Share Posted April 3, 2010 You can set the timezone of your MySQL server with the command SET GLOBAL timezone = <your-timezone>; All returned data will then be modified to your timezone so you don't have to call extra functions in PHP Quote Link to comment https://forums.phpfreaks.com/topic/197445-incredibly-tired-need-help-with-timestamp-issues/#findComment-1036328 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.