Welcome Guest, Not a member yet? Register   Sign In
time computation
#1

[eluser]wildcard99[/eluser]
Hello, im building an online lessons booking, the teacher opens a schedule and then it save to the database in the following format
Code:
date('M d, Y h:i A')
. My problem is that if a user from japan browse to the schedule, how do i adjust the schedule time to the users timezone so that the time scheduled being viewed from japan will automatically be offset according to their timezone?

Do i need to convert the schedule time to GMT on the teachers side before saving to the database?
#2

[eluser]adamp1[/eluser]
Maybe have a read of this. For me I would store the time in GMT format and then when anyone wants to view it apply their local time zone, which can be simple mathematics if no function exists (there probably does though)
#3

[eluser]wildcard99[/eluser]
Hi tnx.. Im reading it now, be back when i have something.
#4

[eluser]ontguy[/eluser]
I came across an expressionengine wiki that may help; http://expressionengine.com/wiki/Dates_Explained/




Theme © iAndrew 2016 - Forum software by © MyBB