Time off by an hour on forum (DST)

The Green Button has risen from the grave. Brought back to life by a few enthusiasts who think the same way you do. Help us make this site better!
Post Reply
Space

Posts: 2838
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

Time off by an hour on forum (DST)

#1

Post by Space » Mon Jan 02, 2017 8:47 pm

Is it necessary to manually change the "Summer Time/DST is in effect:" option in the control panel of these forums whenever we transition in and out of DST? Or is it supposed to change automatically?

I currently have to set it to "No" to get the correct time on forum postings.

User avatar
Scallica

Posts: 2797
Joined: Mon Jun 06, 2011 7:09 pm
Location: USA!

HTPC Specs: Show details

#2

Post by Scallica » Mon Jan 02, 2017 9:25 pm

Space wrote:Is it necessary to manually change the "Summer Time/DST is in effect:" option in the control panel of these forums whenever we transition in and out of DST?
Yes, because not all locations recognize DST, such as the great state of Arizona.
HTPC Enthusiast / Forum Moderator - TGB.tv Code of Conduct

Space

Posts: 2838
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#3

Post by Space » Mon Jan 02, 2017 10:26 pm

Scallica wrote:
Space wrote:Is it necessary to manually change the "Summer Time/DST is in effect:" option in the control panel of these forums whenever we transition in and out of DST?
Yes, because not all locations recognize DST, such as the great state of Arizona.
That doesn't seem like a good reason to not have the adjustment happen automatically.

I thought maybe the setting was a "YES we observe DST/NO we do not observe DST" and if you had it set to YES, then it would happen automatically based on the timezone you have set.

Your answer seems to indicate that it has to be changed manually every ~6 months (which answers my initial question), but your reason for having to do it is not really a good reason.

User avatar
Scallica

Posts: 2797
Joined: Mon Jun 06, 2011 7:09 pm
Location: USA!

HTPC Specs: Show details

#4

Post by Scallica » Mon Jan 02, 2017 10:39 pm

The option is to commence DST / conclude DST, not whether it should be observed.

I think part of the reason it is this way is because the DST range changes every year and DST is not recognized in most of the globe. Also, phpbb sucks, so there's that.
HTPC Enthusiast / Forum Moderator - TGB.tv Code of Conduct

Space

Posts: 2838
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#5

Post by Space » Mon Jan 02, 2017 11:17 pm

DST ranges do not change every year as far as I know, but yes, they do change from time to time. This is why systems have a way of specifying when DST goes in to and out of effect for each timezone and ways to change it.

POSIX 1003.1 section 8 TZ strings are one way of doing this:

Example for Eastern time zone:
EST5EDT,M3.2.0,M11.1.0

This string specifies everything you need to know about the timezone, including when DST starts and ends.
If the date/time that DST starts/ends changes, then you just need to update this string.

Breakdown of M3.2.0 (when DST starts, the M11.1.0 indicates when it ends):
M3 = Third month (March)
2 = Second week of the month
0 = First day of the week (Sunday)
The time of the change defaults to 2am, but you can also specify a different time for the change to occur (you don't need to specify anything if it should use the default)

You can find a summary of the syntax here:
http://www.di-mgt.com.au/wclock/tz-syntax.txt

You can see strings for many different time zones here (you can see that Phoenix, AZ is simply MST7, indicating no DST observance):
http://wiki.openwrt.org/doc/uci/system#time_zones

So I think ultimately you are correct when you say that phpbb sucks :-)

User avatar
Scallica

Posts: 2797
Joined: Mon Jun 06, 2011 7:09 pm
Location: USA!

HTPC Specs: Show details

#6

Post by Scallica » Mon Jan 02, 2017 11:55 pm

Space wrote:DST ranges do not change every year as far as I know, but yes, they do change from time to time.
The exact date changes slightly each year.

http://www.calendar-updates.com/info/ho ... s/dst.aspx
HTPC Enthusiast / Forum Moderator - TGB.tv Code of Conduct

Space

Posts: 2838
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#7

Post by Space » Tue Jan 03, 2017 3:09 am

Of course the exact date changes, but it is always deterministic (unless they change that, which happens only rarely). So in the US, the change happens on the Sunday of the second week in March and the Sunday of the first week in November. It always happens on Sunday morning, so obviously is not on the same date every year (just like Easter :-) )

Post Reply