Time Zone differences

For all of your future version needs.

Moderator: davidyin

Post Reply
User avatar
tyman00
Members
Members
Posts: 42
Joined: Tue Dec 20, 2005 12:59 pm
Location: Mandan, ND
Contact:

Time Zone differences

Post by tyman00 » 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.

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

User avatar
davidyin
Members
Members
Posts: 181
Joined: Wed Apr 27, 2005 10:50 pm
Location: Burnaby

Post by davidyin » Thu Jan 19, 2006 2:42 pm

It is a good idea to implement different time zone for every user.
I will think about it.

User avatar
davidyin
Members
Members
Posts: 181
Joined: Wed Apr 27, 2005 10:50 pm
Location: Burnaby

Post by davidyin » Wed Jan 25, 2006 3:40 pm

I am stuck by the daylight saving changes.

Here is the link of it from WiKi.

Canada
The Canadian provinces of Ontario, Manitoba and Québec have pledged to change their daylight saving rules to match the new US rules (The Montreal Gazette). In 2007, their DST will start on the second Sunday of March, and return to standard time on the first Sunday in November.

In Canada, time is under provincial, not federal, jurisdiction. The province of Saskatchewan is the only part of that country (other than northeastern British Columbia and Southampton Island) that does not use DST, that is, it does not change times in spring and fall. Saskatchewan is bisected by the 105th meridian, the central meridian of the Mountain Standard Time Zone (GMT -7), yet clocks are kept at GMT minus six hours all year long. (This policy was implemented when the Saskatchewan Time Act was passed in 1966, to solve the problems that arose when time zones varied from town to town.) Thus, in the summer months Saskatchewan is in sync with Mountain Daylight Time and in the winter months it is in sync with Central Standard Time. Observationally, this is equivalent to the province being on Mountain Daylight Time year-round, though officially the province is considered to be part of the Central time zone. The charter of the city of Lloydminster, which is bisected by the Saskatchewan–Alberta border, gives it a special exception (among areas in Saskatchewan) to use DST. Lloydminster and its immediately surrounding region in Saskatchewan use the same timekeeping routine used by Alberta, DST with Mountain Standard Time. See this document produced by Saskatchewan Government Relations for further details on Saskatchewan's time policies.


United States
Through the end of 2006, the United States starts its DST on the first Sunday in April, and changes back to standard time on the last Sunday in October. Beginning in 2007, it will start DST on the second Sunday in March, and change back to standard time on the first Sunday in November.

Daylight saving time was reinstated in the United States on February 9, 1942, again as a wartime measure to conserve resources. This remained in effect until World War II began winding down and the requirement was removed on September 30, 1945.

From 1945 to 1966, U.S. federal law did not address daylight saving time. States and localities were free to observe daylight saving time or not. This resulted in a patchwork where some areas observed DST while adjacent areas did not, and it was not unheard of to have to reset one's clock several times during a relatively short trip (e.g., bus drivers operating between Moundsville, West Virginia, and Steubenville, Ohio had to reset their watches seven times over 35 miles).

The U.S. federal Uniform Time Act of 1966 mandated that daylight saving time begin nationwide on the last Sunday of April and end on the last Sunday of October. Any state that wanted to be exempt from daylight saving time could do so by passing a state law, provided that it exempt the entire state. The law was amended in 1972 to permit states that straddle a time zone boundary to exempt the entire area of the state lying in one time zone. The law was amended again in 1986 to begin daylight saving time on the first Sunday in April, to take effect the following year.

In response to the 1973 energy crisis, daylight saving in the United States was begun earlier in both 1974 and 1975, commencing on the first Sunday in January (January 6) in the former year and the last Sunday in February (February 23) in the latter.

Starting March 11, 2007, daylight saving time will be extended another four to five weeks, from the second Sunday of March to the first Sunday of November. The change was introduced by the Energy Policy Act of 2005; the House had originally approved a motion that would have extended DST even further. Proponents claimed that the extension would save "the equivalent of" 10,000 barrels of oil per day, but this figure was based on U.S. Department of Energy information from the 1970s, the accuracy and relevance of which the DoE no longer stands by. There is very little recent research on what the actual positive effects, if any, might be. (See this article, for example.)

The extension was greeted by criticism from the airline industry and those concerned for the safety of children traveling to school in the dark before the late sunrise.

An additional issue raised by this extension is that it requires reconfiguration of virtually every computer in the United States. Most computers are programmed to adjust automatically for DST, but they do so based on static tables stored directly on the computer itself. In order to change the dates and times at which the automatic jump to or from DST occurs, these tables must be modified, which requires some sort of manual intervention by a human being in the great majority of cases. A two-minute procedure for updating a computer, multiplied by a hundred million computers, represents nearly 1700 years of full-time labor. More difficult to quantify is the amount of labor and money that may be spent correcting errors that arise due to a failure to update computers. Certain types of information systems (those that schedule future events with reference to UTC, for example) are almost guaranteed to encounter serious desynchronization problems unless both computers and databases are carefully updated—in some cases by hand.

User avatar
tyman00
Members
Members
Posts: 42
Joined: Tue Dec 20, 2005 12:59 pm
Location: Mandan, ND
Contact:

Post by tyman00 » Wed Jan 25, 2006 6:00 pm

I think the only issues you will see are from those that do not observe daylight savings. Which from your article shows that Saskatchewan doesn't. I would assume other countries/provinces/stats around the world might not as well.

You should not have any issues with DST in those states that do on the other hand. This is because you will base your times off of the server time. I.E. Location one is 2 hours behind the server and location two is one hour ahead. You get the time from the server (like you do now) and subtract 2 hours or add 1 hour. So as long as the server observes DST you will be ok.

Actually you won't have problems unless you have one locatoin that observes DST and one that doesn't. In this situation you could make a setting in the company settings that would disable this feature.

Just my thoughts.

User avatar
davidyin
Members
Members
Posts: 181
Joined: Wed Apr 27, 2005 10:50 pm
Location: Burnaby

Post by davidyin » Thu Jan 26, 2006 12:24 pm

In Canada, we may face this problem.
West canada and east Canada are all have DST, but the date to change is different.
More locations will make the situation more complex.

If the Date of changing DST of Server and all locations are same, it is easy.
If not same or some place do not use DST, it is totally different.

Situation 1:
Server uses DST.
Location 1 uses DST.
Location 2 uses DST, but on different date to change DST.
Location 3 does not use DST.

For location 1, just adding the difference hours is ok.
For location 2, put a special markup of changing date, and let the DST effective on that date.
For location 3, minus or plus one hour when the Server changes its time on DST changing.



Situation 2:
Server does not use DST.
Location 1 uses DST.
Location 2 uses DST, but on different date to change DST.
Location 3 does not use DST.

For location 1, minus or plus one hour when the Location 1 change to DST.
For location 2, miuns or plus one hour when the location 2 change to DST.
For location 3, no change.

User avatar
tyman00
Members
Members
Posts: 42
Joined: Tue Dec 20, 2005 12:59 pm
Location: Mandan, ND
Contact:

Post by tyman00 » Thu Jan 26, 2006 2:20 pm

Yeah, that is what I was also thinking. It wouldn't be so bad if you Canadians didn't have to be so difficult :P .


I will think about it tonight to see if I can come up with any solutions. Do you know how the people that wrote this message board (phpBB) do it. Maybe we could model a solution off of their thought process, that is if they address this situation of having some people on DST, some not and some changing on different dates.

User avatar
davidyin
Members
Members
Posts: 181
Joined: Wed Apr 27, 2005 10:50 pm
Location: Burnaby

Post by davidyin » Fri Jan 27, 2006 12:14 am

After Googleing, and learn some famous program like this forum PHPBB. I think that useing different time zone only will make it simple.

Forget about the DST in the next version.

User avatar
tyman00
Members
Members
Posts: 42
Joined: Tue Dec 20, 2005 12:59 pm
Location: Mandan, ND
Contact:

Post by tyman00 » Fri Jan 27, 2006 7:06 am

It is unfortunate that those who have different DST policies than the server will have to suffer. But that should be good enough reason for them to get on to the DST bandwagon :twisted:

At any rate, just having the time zone differences is a step towards a better program.

One thing that a user could do is if they are having an issue with DST compared to the server, they could change their time difference setting in their profile when the server switches for DST so it will match up. A little extra work, but beings that there will be so few it shouldn't be to big of a problem.

User avatar
davidyin
Members
Members
Posts: 181
Joined: Wed Apr 27, 2005 10:50 pm
Location: Burnaby

Post by davidyin » Mon Jan 30, 2006 4:37 pm

Time Zone is implemented in the [ur=http://pentacle.g2soft.net]Demo, Testing [/url]site.
Try it and give me some advise.

The codes changed are in the almost every files, including attendance report.

Please check it.
I use the server time in the database, so it is to upgrade to the next version.
Last edited by davidyin on Wed Feb 01, 2006 9:46 am, edited 2 times in total.

User avatar
tyman00
Members
Members
Posts: 42
Joined: Tue Dec 20, 2005 12:59 pm
Location: Mandan, ND
Contact:

Post by tyman00 » Wed Feb 01, 2006 7:44 am

It looks good. You might want to consider rebuilding the Location buttons so they don't look so pixelated from being streched.


You won't by change offer a download of the files would you? Just so I can take a look at the changes? 8)

User avatar
davidyin
Members
Members
Posts: 181
Joined: Wed Apr 27, 2005 10:50 pm
Location: Burnaby

Post by davidyin » Wed Feb 01, 2006 10:15 am

The Location buttons and some graphic files will be redesigned or rebuild to make the Board clear and pretty.

All new features showed on the DEMO site may be shipped with our next version, V6.03.
Normally the big release version is based on the months of my family members' birthday. So I think it may looks like 5.12, 6.03, 6.06, 6.10, 6.12, 7.03..... Some version number may overleap. It depends on my office workload, users feedback, and my free time.

Thank you for your supporting.

Feonnor
Newbie
Newbie
Posts: 1
Joined: Mon Oct 29, 2018 4:48 am
Contact:

Re: Time Zone differences

Post by Feonnor » Mon Oct 29, 2018 4:49 am

After Googleing, and learn some famous program like this forum PHPBB. I think that useing different time zone only will make it simple.

tocnaza
Newbie
Newbie
Posts: 1
Joined: Thu Nov 08, 2018 1:00 am

Re: Time Zone differences

Post by tocnaza » Thu Nov 08, 2018 1:02 am

Hello!

At any rate, just having the time zone differences is a step towards a better program.

Regards,

LennaCave
Members
Members
Posts: 1
Joined: Thu Feb 28, 2019 5:27 am

Re: Time Zone differences

Post by LennaCave » Tue Mar 05, 2019 5:38 am

The Canadian areas of Ontario, Manitoba and Québec have swore to adjust their light hours sparing plans to check the shiny new US standards The Montreal Gazette. their DST will on the second Sunday of March, and profit to ordinary time for the principal Sunday in November.

Post Reply