Strange timezone showing up on site. Way off


#1

Just wondering what would cause my server to display the date and time seriously wrong.

I ran a sql query (via phpmyadmin) to add some extra info to my site. The timestamps in the mysql query are correct for my local timezone and this is how I’ve always done it.

This was my problem: If the timestamp equated to Oct 31, 2011 9:00pm my time EDT, my site page (.php) was displaying it as Nov 1, 2011 4:00am. It was fine before and it displayed correctly before.

My WordPress is up to date and is set to the correct New York timezone and does not affect/effect my php function to pull and return the info listings within it’s pages. The function is declared within my WP theme. Both the WP install tables and the extra info tables I was pulling from are from the same database.

I had one or two problems like this before within the last few years with the time display shifting badly and I readjusted the time to reflect correctly. I can under stand giving or taking a hour during daylight savings but this? The other times it was off by weird amounts but I can’t recall what timezones they were.

[color=#0000CD]Again just wondering… DreamHost time is -3 hours behind me I know and GMT/UTC is now ahead +4. What could make my site +7 hours off?[/color]

[color=#FF0000]P.S.[/color] I resorted to adding… date_default_timezone_set('America/New_York'); …to my php function which corrected the display and I’ve set up to switch to PHP5.3 and using a phprc as per DH’s wiki on “php.ini” to set it up with

[code]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone

[Date]
date.timezone = America/New_York[/code]