Opposite of + or - is occurring when selecting time zone
I select ETC/GMT-5 on the web interface, and typing 'date' in shell shows the opposite, +5. I changed to -4, it went to +4. I changed to +4, it went to -4.
This is on the Netgate SG-1000
built on Thu Jan 05 10:53:36 CST 2017
#2 Updated by Phillip Davis 4 months ago
"The special area of "Etc" is used for some administrative zones, particularly for "Etc/UTC" which represents Coordinated Universal Time. In order to conform with the POSIX style, those zone names beginning with "Etc/GMT" have their sign reversed from the standard ISO 8601 convention. In the "Etc" area, zones west of GMT have a positive sign and those east have a negative sign in their name (e.g "Etc/GMT-14" is 14 hours ahead/east of GMT.)"
Goodness knows why really, but there you have it.
I guess something can be put in the GUI to alert users to this "feature" of timezone specification.
The "feature" happens on 2.3-RELEASE, 2.3.2-RELEASE, 2.3.3-DEVELOPMENT and 2.4.0-BETA. So all current pfSense installs work like this. I guess it has been like ths for a while.
#3 Updated by Phillip Davis 4 months ago
Also, 99.9% of users should be selecting a timezone based on a continent/city in their area. This makes summer time changes happen as needed and so on. That all works - I double-checked switching to Sydney, Kathmandu and New York and time happens as expected.
#5 Updated by Renato Botelho 4 months ago
- Status changed from New to Feedback
- Assignee set to Renato Botelho
- Priority changed from High to Normal
- Target version set to 2.4.0
- % Done changed from 0 to 100
- Affected version set to All
Changes were added to let user know about how it works, as proposed by Phil.
#9 Updated by Jim Pingle 4 months ago
pfSense is not other products. And the Etc zones are NOT what you want, likely ever. We have been tempted to remove or hide them in the past. We have changed the language on the option to make that more obvious. If we cosmetically flipped the signs, it would likely lead to even more confusion.
In addition to the source Phil posted above with reasoning, there is also this from the tz database:
# We use POSIX-style signs in the Zone names and the output abbreviations, # even though this is the opposite of what many people expect. # POSIX has positive signs west of Greenwich, but many people expect # positive signs east of Greenwich. For example, TZ='Etc/GMT+4' uses # the abbreviation "GMT+4" and corresponds to 4 hours behind UTC # (i.e. west of Greenwich) even though many people would expect it to # mean 4 hours ahead of UTC (i.e. east of Greenwich).
#10 Updated by Phillip Davis 4 months ago
The thing needs to be kept in-line with what the "standard" tz-database distribution is doing. Otherwise, as Jim says, it will get even more confusing as some people know what the tz "standard" did and expect that.
I expect that this behavior will be in any OS that is taking the "standard" tz distribution. So not just FreeBSD/pfSense, but every Unix/Linux out there.