Time Zone differences
Posted: Thu Jan 19, 2006 1:04 pm
I don't know how difficult this would be to impliment. But for companies that have locations in multiple time zones it would be neat if the time displayed under the "Updated" also the "Expected Return Time" columns would be shown in your time zone.
An idea would be to specify the timezone the server is in in pt_load.asp, and when you setup a user you could specify the time zone that the user is in.
The following is a Pseudocode of what could happen when the default.asp (or any page) is accessed.
_______________________________________________________
For calculating the difference you want to check the difference of the Server from the User
Server = x
User = y
Difference = z
y-x = z
______________________________________________________
When displaying the time you would want to take the Server time and add the difference.
Displayed time = q
Server time = x (same value from above)
Difference = z (same value from above)
x+z = q
_______________________________________________________
Example 1:
If the server was in Central Time (GMT -06:00) variable - (x) and the user in Mountain Time (GMT -07:00) variable - (y).
The page would calculated that there is a -1 difference variable - (z) from Mountain Time to Central. So when the page is displayed it would take the Server time and add -1 to that time, the time displayed would be variable - (q)
________________________________________________________
Example 2:
If the server was in Central Time (GMT -06:00) variable - (x) and the user in Eastern Time (GMT -05:00) variable - (y).
The page would calculated that there is a +1 difference variable - (z) from Eastern Time to Central. So when the page is displayed it would take the Server time and add +1 to that time, the time displayed would be variable - (q)
________________________________________________________
I hope this made sense. I don't think the thought process is flawed. It would be a little bit of work to incorporate at first but it could be very beneficial to do it now if you plan on adding more features down the road.
You could also use this message board as an example. It too performs this feature with the process much like I described it.
For more information on Greenwich Mean Time (GMT) go here:
http://wwp.greenwichmeantime.com/info/gmt.htm
http://wwp.greenwichmeantime.com/info/timezone.htm
An idea would be to specify the timezone the server is in in pt_load.asp, and when you setup a user you could specify the time zone that the user is in.
The following is a Pseudocode of what could happen when the default.asp (or any page) is accessed.
Code: Select all
Pseudocode:
1. Find user in Database
2. Get user timezone
3. If user timezone is equal to server timezone
3a. Then display server timezone
4. If user and server timezones are not equal
4a. Then check for amount of difference in time zones
This can be done with a database of the time zones and their GMT values.
4b. Take this difference and change the times is applied and displayed according to the user's time zone
For calculating the difference you want to check the difference of the Server from the User
Server = x
User = y
Difference = z
y-x = z
______________________________________________________
When displaying the time you would want to take the Server time and add the difference.
Displayed time = q
Server time = x (same value from above)
Difference = z (same value from above)
x+z = q
_______________________________________________________
Example 1:
If the server was in Central Time (GMT -06:00) variable - (x) and the user in Mountain Time (GMT -07:00) variable - (y).
The page would calculated that there is a -1 difference variable - (z) from Mountain Time to Central. So when the page is displayed it would take the Server time and add -1 to that time, the time displayed would be variable - (q)
________________________________________________________
Example 2:
If the server was in Central Time (GMT -06:00) variable - (x) and the user in Eastern Time (GMT -05:00) variable - (y).
The page would calculated that there is a +1 difference variable - (z) from Eastern Time to Central. So when the page is displayed it would take the Server time and add +1 to that time, the time displayed would be variable - (q)
________________________________________________________
I hope this made sense. I don't think the thought process is flawed. It would be a little bit of work to incorporate at first but it could be very beneficial to do it now if you plan on adding more features down the road.
You could also use this message board as an example. It too performs this feature with the process much like I described it.
For more information on Greenwich Mean Time (GMT) go here:
http://wwp.greenwichmeantime.com/info/gmt.htm
http://wwp.greenwichmeantime.com/info/timezone.htm