What's the best way to handle a long list in settings?

Hello,

What's the best way to handle a long list in settings?

I am making a watch face where the user can select a time zone or Zulu offset.  There are over 30 different time zones around the globe and I'd rather not do a super long list.  Mainly because I'd have to create over 30 items in the list, then re-create this in strings.  Any thoughts?

I've considered doing 5 different number entries (1st for plus or minus, 2nd & 3rd for hours, 4th and 5th for minutes), but I have no say in the formatting of the settings page (other than <group>) to make it look obvious.  

I tried asking for the hours separate from the minutes (constrained with min-max), but i don't think it was clear what I was looking for.

I could ask for the time zone as a string and then reference a database, but then I'd have to create and maintain a database of currently 117 time zones (https://www.worlddata.info/timezones/index.php).

Thoughts?

Top Replies

All Replies

  • To summarize:

    The meaning of "time zone" depends on context.

    A) In one sense of the phrase "time zone", Arizona and Colorado are in the same "time zone" because they're both in the "Mountain Time Zone".

    B) In another sense, when you select a "time zone" in Windows (and other computer systems), you're actually selecting a rule which describes both the "time zone" (as in A) AND the daylight savings time rules. Examples of "daylight savings time rules": Arizona does not observe DST, but Colorado and other "Mountain Time locations" do observe DST in the summer. (*)

    So when you want to give the user the ability to "manually select a time zone", *and* you want to be able to automatically adjust the clock for daylight savings time, you have to use the meaning of "time zone" described in B.

    (*) I realize the situation is complicated by the fact that some states (including Colorado) are trying to go with DST all year round. If this happens, I expect a future update to Windows so the list of "time zones" looks like:

    "(UTC-7) Mountain Time"
    "(UTC-7) Arizona"
    "(UTC-7) Colorado, ..." (this will be a new entry for CO and all the other states which go with DST all year round)

    I mean it's not a great situation, but what else are they gonna do?

    Maybe it's better that some systems ask you to select the "nearest city" instead of asking you to "select a time zone", but that's not really feasible for Connect IQ (I mean if you need to select a "time zone / location" which is *not* your current location.)

  • Another possibility that I just thought of:

    - For System 5 devices, instead of asking the user to select a "time zone", you ask them to enter the latitude and longitude of a *location* (like Denver, Phoenix or New York). Extremely user-unfriendly, but would be simple to implement using LocalMoment, and Garmin would handle the TZ/DST logic for you.

    Only problem is no user is gonna do that. (Too bad there's no concept of a "location picker" in Connect IQ app settings.)

  • Is it the same timezone? I have the following options to pick from on Debian:

    US/Alaska
    US/Aleutian
    US/Arizona
    US/Central
    US/East-Indiana
    US/Eastern
    US/Hawaii
    US/Indiana-Starke
    US/Michigan
    US/Mountain
    US/Pacific
    US/Samoa

    Seems like two different timezones to me. US/Arizona is America/Phoenix and US/Mountain is America/Denver under the hood. Which can be seen here:

    /usr/share/zoneinfo/US
    $ ll
    total 0
    lrwxrwxrwx 1 root root 20 Aug 16 05:14 Alaska -> ../America/Anchorage
    lrwxrwxrwx 1 root root 15 Aug 16 05:14 Aleutian -> ../America/Adak
    lrwxrwxrwx 1 root root 18 Aug 16 05:14 Arizona -> ../America/Phoenix
    lrwxrwxrwx 1 root root 18 Aug 16 05:14 Central -> ../America/Chicago
    lrwxrwxrwx 1 root root 31 Aug 16 05:14 East-Indiana -> ../America/Indiana/Indianapolis
    lrwxrwxrwx 1 root root 19 Aug 16 05:14 Eastern -> ../America/New_York
    lrwxrwxrwx 1 root root 19 Aug 16 05:14 Hawaii -> ../Pacific/Honolulu
    lrwxrwxrwx 1 root root 23 Aug 16 05:14 Indiana-Starke -> ../America/Indiana/Knox
    lrwxrwxrwx 1 root root 18 Aug 16 05:14 Michigan -> ../America/Detroit
    lrwxrwxrwx 1 root root 17 Aug 16 05:14 Mountain -> ../America/Denver
    lrwxrwxrwx 1 root root 22 Aug 16 05:14 Pacific -> ../America/Los_Angeles
    lrwxrwxrwx 1 root root 20 Aug 16 05:14 Samoa -> ../Pacific/Pago_Pago
    
    $ file ../America/Denver
    ../America/Denver: timezone data (fat), version 2, 5 gmt time flags, 5 std time flags, no leap seconds, 158 transition times, 5 local time types, 20 abbreviation chars
    
    $ file ../America/Phoenix
    ../America/Phoenix: timezone data (fat), version 2, no gmt time flags, no std time flags, no leap seconds, 11 transition times, 4 local time types, 16 abbreviation chars

  • Is it the same timezone?

    He doesn't understand and he never will understand because I posted 20 variations of the same argument and it was a waste of time. e.g.

    - Windows (with a literal GIF / screenshots which demonstrates switching between "Arizona" and "Mountain Time")

    - Steam deck / Linux

    - IANA TZ Database

    I've also made the same argument in the past.

    Seems like two different timezones to me. US/Arizona is America/Phoenix and US/Mountain is America/Denver under the hood. Which can be seen here:

    Not to mention that if you look at the rules for those "time zones", they are different too. US/Mountain => MDT (UTC-6) in summer, MST (UTC-7) at other times. US/Arizona = MST (UTC-7) all year round.

    He's hung up on the fact that both Colorado and Arizona (for example) are in the Mountain Time Zone, and doesn't understand that in the context of "selecting a time zone on a Windows / Linux / other computer system", a "(computer) time zone" is actually a "(political/legal/social) time zone + daylight saving time rules".

    To be fair it's very hard to discuss this stuff because "time zone" has two meanings here, and the second meaning refers to the first.

    What blows my mind is literally every time this is discussed, he makes the argument that this stuff is hard / impossible on CIQ because of Arizona (the exception to the Mountain Time rule.) Then if you show him a screenshot of the Windows "time zone" list which literally has a separate entry for Arizona, he doesn't understand how this exception is easily handled.

    I will admit that the fact that CO (and other Mountain Time states) are trying to go always-DST next year does make it annoying if you want to allow your user to select a "time zone" manually. Whether you maintain your own (concise) TZ DB or you use Garmin's LocalMoment, you might have to add a new "manual time zone entry" for Colorado and other states next year. This is an issue for any system that allows you to choose from some hardcoded subset of the IANA time zones (e.g. Steam Deck).

  • One more wrinkle, is the Navajo nation in NE AZ, does do DST, so it's not really US/Arizona!

    And as far as always DST in the US (I doubt that will happen) Exempts states that don't do DST (AZ and Hawaii)

    Next time tzmap gets sent out (probably this fall) look at the change log on GE, You'll see where dates change, some places opt out of DST, etc.

  • It is actually well documented: https://en.wikipedia.org/wiki/Time_in_Arizon

    The Navajo use America/Shiprock which is America/Denver (which is US/Mountain), therefore the Navajo do *not* use US/Arizona, they use US/Mountain.

    ls -altr | grep Ship
    lrwxrwxrwx 1 root root 6 Aug 16 05:14 Shiprock -> Denver

    You should look at https://en.wikipedia.org/wiki/Tz_database and use that for further reference.

    US/Arizona is basically US/Mountain minus the DST. So there we have it. Two different timezones for the state of Arizona.

    You make the mistake by thinkging that Arizona (state) lies *in* the US/Mountain timezone and thus uses US/Mountain but without using DST and thus think it is US/Mountain and think US/Mountain is an alias for US/Arizona. 

    The state of Arizona lies *in* US/Mountain yet observes *different* rules, making it a *different* timezone. That different timezone being US/Arizona which in the winter equals the US/Mountain timezone (Mountain standard time) and in the summer equals other timezone(s) (Pacific Daylight Time).

  • To be fair it's very hard to discuss this stuff because "time zone" has two meanings here, and the second meaning refers to the first.

    It does and it doesn't. A timezone is a thing based on the 15 degrees which constitute on hour difference based on the sun's and earth rotation (science). Than we have the political aspects. China adheres to one timezone for some weak ass political slogan "National unity", Arizona chose not to use DST because hot. The Navajo chose US/Mountain for reasons I do not know. Venezuela chose a different offset because they didn't want to be in the same timezones as the US (petty, but a reason nonetheless). Timezone the science bit tells us what the scientifc time would be and timezones the human bit tells us a timezone based on political/social/etc reasons combined with the science bit. It is like theory in science and theory in the dictionary, one is a explanation of the facts the other is a rough concept of an idea.

    Ps. I'm agreeing with you here Slight smile

  • Your source is incorrect.  AZ is in MT.  MST time (except for the Navajos!) year round.  It just never uses MDT.

    AZ is in the Mountains Time Zone.

  • Yes, ICANN is incorrect, you are right.

  • Your source is incorrect.  AZ is in MT.  MST time (except for the Navajos!) year round.  It just never uses MDT.

    AZ is in the Mountains Time Zone.

    I don't know how many times I have to explain this.

    There are 2 meanings of "time zone" here.

    1) The political/legal/social/geographical area concept of a time zone. e.g. The Mountain Time Zone includes Arizona, Colorado, and other states. This is NOT the time zone that Windows asks you to select (notice how Windows has *separate* time zones for AZ and "Mountain Time").

    2) The IANA/computer definition which is "time zone (definition 1) + daylight savings time rules". This is the "time zone" which computers usually ask you to select, including Windows, some Linux distros and the Steam Deck gaming console.

    Your mistake is somehow believing that a user should select "time zone (definition 1)", but in fact they actually should select "time zone (definition 2)". This is assuming that you want the computer to automatically handle DST rules.

    Some systems (like iOS, Mac, and certain Linux distros) avoid this problem by just asking you to enter the nearest city to where you are.