[FIX] Daylight Saving Time

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
twmm
Registered User
Posts: 51
Joined: Sat Nov 09, 2002 12:19 am
Location: Just Right of the Void

Post by twmm »

jeep wrote: Won't this just invert the problem? So users NOT in places that observe daylight savings time wil lhave to adjust their timezones instead of those who are in places with DST?


Once again.... this fix has nothing whatsoever to do with the timezone of the user!!! This fix is for the timezone of the forums.

Regards,
TW
inque187
Registered User
Posts: 94
Joined: Sat Jun 29, 2002 9:17 am
Contact:

Post by inque187 »

Well, every time I delte/flush the cookies from my browser - it seems to fix the problem. But it is really strange that the time is off and everything is configured properly on the forum and in my profile.

Any more ideas as to why this is a problem?
User avatar
twmm
Registered User
Posts: 51
Joined: Sat Nov 09, 2002 12:19 am
Location: Just Right of the Void

Post by twmm »

Rancisis wrote: If I understand it correctly, the code goes watch the server time to see if it's DST or not.
If it is, it ads an hour to the date you see.
And all users can still say in their profile what GMT they have.


The times effected are the times posted, i.e. the forums times. If something was posted during a "standard time", it will remain a standard time. If something was posted during "daylight/summer" time, it will reflect that time. The user's timezone is independent of the timezone set for the forums. It is available as a convenience to allow users to "see" the forum's times relative to their local time.

This is not magic, nor is it an overall change to ALL times for ALL users... it is a means for the forums times to correctly reflect "Daylight/Summer" time if the server observes Daylight/Summer time.

Once again, there are a myriad of reasons why there is not a universal "Daylight/Summer" time... they are based on geographical, geopolitical, and/or socio-economic reasons. in the USA, as in other countries, not everyone adheres to "Daylight/Summer' time. Some areas of the USA remain on standard time year around. Some areas have opted to follow the time zone just to the east or west due to a variety of reasons.... again geographical, geopolitical, and/or socio-economic reasons.

Regards,
TW
Last edited by twmm on Mon Jun 09, 2003 7:12 pm, edited 2 times in total.
inque187
Registered User
Posts: 94
Joined: Sat Jun 29, 2002 9:17 am
Contact:

Post by inque187 »

I found that once the time fixes (after flushing cookies) I have to use the "Time/Date Edit Mod" to change the dates/times that were incorrectly timestamped.

:roll: It works for me but a little too much of "go back and fix" stuff.

And Arizona are the only ones in the USA that do not use DST.
User avatar
twmm
Registered User
Posts: 51
Joined: Sat Nov 09, 2002 12:19 am
Location: Just Right of the Void

Post by twmm »

inque187 wrote: It works for me but a little too much of "go back and fix" stuff.

And Arizona are the only ones in the USA that do not use DST.


First, there is nothing to go back and fix. The times recorded and stored in your database tables are GMT (UT) times. Second, you are incorrect in your statement about who and where DST is/is not observed in the USA.
Daylight Saving Time, for the U.S. and its territories, is NOT observed in Hawaii, American Samoa, Guam, Puerto Rico, the Virgin Islands, most of the Eastern Time Zone portion of the State of Indiana, and the state of Arizona (not the Navajo Indian Reservation, which does observe). Navajo Nation participates in the Daylight Saving Time policy, due to its large size and location in three states.
... from http://webexhibits.org/daylightsaving/b.html

Regards,
TW
Last edited by twmm on Wed Jun 11, 2003 9:52 am, edited 2 times in total.
User avatar
twmm
Registered User
Posts: 51
Joined: Sat Nov 09, 2002 12:19 am
Location: Just Right of the Void

Post by twmm »

**
Last edited by twmm on Thu Jun 12, 2003 12:02 am, edited 3 times in total.
jeep
Registered User
Posts: 93
Joined: Mon May 19, 2003 8:57 pm

Post by jeep »

inque187 wrote: And Arizona are the only ones in the USA that do not use DST.


Not true.

Hawaii doesn't, and neither does most of Indiana.

-JEEP
jeep
Registered User
Posts: 93
Joined: Mon May 19, 2003 8:57 pm

Post by jeep »

Heh, simul-post.
The times recorded and stored in your database tables are GMT (UT) times


Really? Aren't they stored in "seconds since the epoch"? Which is why I don't understand this "fix". It doesn't matter if you store data by calling it DST or not because it gets changed into an integer value that is the number of seconds since (usually) Jan 1, 1970.

It's like storing numbers as hex or decimal... it makes no difference, internally it's just a number, only how you display it matters. (If I have two sets of five rocks, it doesn't matter if I say I have 10 or 0xA rocks, it's the same thing to the computer.)

-JEEP
User avatar
twmm
Registered User
Posts: 51
Joined: Sat Nov 09, 2002 12:19 am
Location: Just Right of the Void

Post by twmm »

jeep wrote: It doesn't matter if you store data by calling it DST or not because it gets changed into an integer value that is the number of seconds since (usually) Jan 1, 1970.


Zactly so... just different words for the same meaning... Except, the timezone of the stored values is 0... GMT (UT). So until you display the times via the create_date function, the timezone does not come into play.

Regards,
TW
jeep
Registered User
Posts: 93
Joined: Mon May 19, 2003 8:57 pm

Post by jeep »

*sigh* I guess I'm just confused...

Unless all your users are known to be in the same place, why would you implement this?

-JEEP
User avatar
twmm
Registered User
Posts: 51
Joined: Sat Nov 09, 2002 12:19 am
Location: Just Right of the Void

Post by twmm »

Once more with feeling.....

The timezones of your users are IRRELEVANT!!!! The timezone of your forum IS RELEVANT!!!! :lol: :lol: The intent is SOLELY to display the forum's time/date stamps correctly when your forum observes "Daylight/Summer" time.

I think some find this issue complictaed due to the fact that there are two places to maintain timezones, one for the forum (board timezone), the other for the user (user profile timezone). The user timezone exists simply as a matter of convenience for the user. Your users can change their timezones as they see fit. Unless you use the "Date for Humans" Mod, most users will never touch their timezones anyway. But they have no affect on the forum date/time stamps... they only effect how a user sees the date/times if they Log in. If they do not log in, they will only see the forum time/date stamps relative to the forum's timezone.

A second point of confusion may lie in the fact that only one time/date stamp is stored, but that time/date stamp can be displayed in a wide vairety of ways at the same time to different users with different profile timezone value settings. The display does not change the stored value... only the presentation.

Regards,
TW
jeep
Registered User
Posts: 93
Joined: Mon May 19, 2003 8:57 pm

Post by jeep »

The timezones of your users are IRRELEVANT!!!! The timezone of your forum IS RELEVANT!!!!


I guess this boils down to: I disagree with that statement. Only what the users see is relevant. Anyway, I have it so the users can select if they observe DST, if they do, the time gets adjusted, so it doesn't matter, I was just hoping to understand why this is a "fix" but I don't think I ever will because I don't accept the basic premise.

-JEEP
User avatar
twmm
Registered User
Posts: 51
Joined: Sat Nov 09, 2002 12:19 am
Location: Just Right of the Void

Post by twmm »

**
Last edited by twmm on Thu Jun 12, 2003 12:00 am, edited 2 times in total.
User avatar
twmm
Registered User
Posts: 51
Joined: Sat Nov 09, 2002 12:19 am
Location: Just Right of the Void

Post by twmm »

**
Last edited by twmm on Thu Jun 12, 2003 12:01 am, edited 2 times in total.
Ron2K
Registered User
Posts: 247
Joined: Sun May 25, 2003 6:10 pm
Location: Cape Town, South Africa
Name: Kieron Thwaites
Contact:

Post by Ron2K »

Let me just add to this quickly - my suggestion is to for the developers to create an option on the profile page which could look something like this:

Do you experience Daylight Savings Time? (user answers yes or no)
If yes, during what days of the year (user specifies) and by how much does the time change (value of 1 could mean that time goes 1 hour forward, value of -0.5 could mean that time goes half an hour backward)

Just a suggestion.... hope someone will find this and work on it....

(PS: DST is never a problem for me, as I don't have any DST users... yet.)
Locked

Return to “[2.0.x] MODs in Development”