View Single Post
Old 01-10-2011, 10:01 PM   #3 (permalink)
hitchy
The Visitor
 
hitchy's Avatar
 
Join Date: Jan 2011
Location: New Zealand
Posts: 3
Thanks: 0
hitchy is on a distinguished road
Default

hello

im a relitive noob when it comes to php but im learning.
i love this script ive been looking HARD for something like this for a long time.

i changed the above script to pull the "TIMEZONE" out of my database and that works fine. the problem i have is that if i use this script to enter the date of say a comment being posted by someone in GMT at 22:52 on the 10th, if its viewed right away by someone in NZDT (GMT +12) it displays the time of 22:52 on the 10th. where as i think it should be 10:52 on the 11th (NZDT) as those dates/times are the same time relitively speaking.

i believe i need to store the date/time in the database in a set standard say UTC? so that when i run this script it pulls a standard date/time that it can change it as needed for the timezones.

what code would i need to change to make it read a date/time field in the database and then perform the needed changes?

i hope i explained everything properly.
thanks for any help
hitchy is offline  
Reply With Quote