Changing Timezone
Posted: Tue Apr 21, 2009 12:56 pm
Hi all,
i hope this is a really simple answer to my question as i have been trying to find one for the past few hours.
i'm trying to convert a timestamp from UTC into the users relevent timezone.
Currently i save all timestamp to the database as UTC and when i pull them out i need them changing. the user has a timezone assigned to their record e.g 'Europe/London'
i need in PHP to say UTC is the current timezone for this timestamp, now change it to timezone 'Europe/London' or any other.
Has anyone got any ideas?
p.s i have looked into the CONVERT_TZ in mysql but the timezone table isn't setup on the server and i can't access it.
i hope this is a really simple answer to my question as i have been trying to find one for the past few hours.
i'm trying to convert a timestamp from UTC into the users relevent timezone.
Currently i save all timestamp to the database as UTC and when i pull them out i need them changing. the user has a timezone assigned to their record e.g 'Europe/London'
i need in PHP to say UTC is the current timezone for this timestamp, now change it to timezone 'Europe/London' or any other.
Has anyone got any ideas?
p.s i have looked into the CONVERT_TZ in mysql but the timezone table isn't setup on the server and i can't access it.