Project

General

Profile

Bug #7089

Opposite of + or - is occurring when selecting time zone

Added by Geoffrey Bricker about 2 months ago. Updated 15 days ago.

Status:
Resolved
Priority:
Normal
Category:
Web Interface
Target version:
Start date:
01/05/2017
Due date:
% Done:

100%

Affected version:
All
Affected Architecture:

Description

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
2.4.0-BETA (arm)
built on Thu Jan 05 10:53:36 CST 2017
FreeBSD 11.0-RELEASE-p5

Associated revisions

Revision e5f4c829
Added by Renato Botelho about 2 months ago

Ticket #7089 Enhance Etc/GMT timezone descriptions

These work opposite to the way mere mortals expect.
Read: https://github.com/eggert/tz/blob/master/etcetera

Based on @phil-davis' patch from https://github.com/pfsense/pfsense/pull/3354

Revision c9911976
Added by Renato Botelho about 2 months ago

Ticket #7089 Enhance Etc/GMT timezone descriptions

These work opposite to the way mere mortals expect.
Read: https://github.com/eggert/tz/blob/master/etcetera

Based on @phil-davis' patch from https://github.com/pfsense/pfsense/pull/3354

History

#1 Updated by Geoffrey Bricker about 2 months ago

Oh and Yes, the time is also incorrect not just the + and the -

#2 Updated by Phillip Davis about 2 months ago

https://en.wikipedia.org/wiki/Tz_database#Area
"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.

Some more info:
https://github.com/eggert/tz/blob/master/etcetera
https://github.com/eggert/tz/commit/5659c5322976ea171e6a5afe14e9bc8172a51e24

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 about 2 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 about 2 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.

#6 Updated by Geoffrey Bricker about 2 months ago

Just so I can be clear, you're saying the intended behavior is that - is + and + is minus? Every other device I've ever selected -5 has always ended up being EST (give or take DST)

#7 Updated by Jim Pingle about 2 months ago

You should not be picking what you think is an offset (but is really a special-use time zone). Pick a geographic zone. Those zones are not what you think they are, thus the confusion.

#8 Updated by Geoffrey Bricker about 2 months ago

In every other environment I've worked in that I can think of, you can pick the -5 and it's correct. Why is this any different? You're going to have issues with that with a lot of people.

#9 Updated by Jim Pingle about 2 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 about 2 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.

#11 Updated by Jim Pingle about 1 month ago

  • Status changed from Feedback to Resolved

New descriptions are more clear, options are labeled in a way that is hopefully obvious.

#12 Updated by Jim Pingle 15 days ago

  • Category set to Web Interface
  • Target version changed from 2.4.0 to 2.3.3

Also available in: Atom PDF