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

  • (as well as attomic clocks) know the TZ
    The atomic clock knows nothing about timezones, it just ticks at one second intervals. Because a second is a clearly defined unit of measurement.

    Yeah, as a matter of fact the international atomic time standard is the basis for UTC, so it's basically timezone-agnostic.

    International Atomic Time (abbreviated TAI, from its French name temps atomique international[1]) is a high-precision atomic coordinate time standard based on the notional passage of proper time on Earth's geoid.[2] It is a continuous scale of time, without leap seconds, and it is the principal realisation of Terrestrial Time (with a fixed offset of epoch). It is the basis for Coordinated Universal Time (UTC), which is used for civil timekeeping all over the Earth's surface and which has leap seconds. UTC deviates from TAI by a number of whole seconds.

    I don't know why anyone would think an atomic clock would need to know the TZ (especially since we've all pointed out that TZ/DST rules are changing all the time). It would make more sense for all atomic clocks to follow a single standard (like say, UTC), and for consumers of "standard atomic clock time" to just add their own TZ offset to the atomic clock time to get local time.

    I just don't understand how one person can post so many objectively wrong things with such assurance.

    I can't believe I have to explain this, but:

    - When computers use a time service to sync their internal clock, they're getting standard time (UTC) from a trusted server which uses an atomic clock.

    - In order to display local time to the user, computers use the currently selected "time zone" (which encompasses both a "human time zone" and "daylight savings time rules") to determine the current "time zone offset". This offset is added to the standard time to produce local time.

  • Actually, you need to set a time zone on them.  Have you ever used one?

  • Actually, you need to set a time zone on them. 

    You would need to set a time zone + DST if the atomic clock itself is going to display local time to you, sure.

    To act as a standard time source to a computer, an atomic clock doesn't need to know the time zone or DST.

    It's only the final computer in the chain which needs to know the time zone/DST to convert UTC to local time.

  • Ok, so I put together a simple test for LocalTime, using my current time and the position of Olathe, and it does look to do as you said.  I stand corrected.  Olate is 2 hours ahead of me as they are in CT - CDT this time of year.

    I just hacked onPosition in the record sample with this to show the hour.

        public function onPosition(info as Info) as Void {
        	var pos=info.position;
        	if (pos!=null) {
        		var now=Time.now();
        		var lm=Time.Gregorian.localMoment(pos,now);
        		var greg=Time.Gregorian.info(lm, Time.FORMAT_MEDIUM);
        		System.println(""+greg.hour);
        	}
        
        }

    To act as a standard time source to a computer, an atomic clock doesn't need to know the time zone or DST.

    But the computer needs to know that..

  • No I don't. I don't have access to an atomic clock. I don't work for one of the 80 labs. They measure resonant frequency of atoms. You don't need a TZ for that. My energy bill cannot support -273 degrees C (aka 0 kelvin), not do I have access to caesium.

    en.wikipedia.org/.../Atomic_clock

    This phenomenon serves as the basis for the International System of Units' (SI) definition of a second:

    The second, symbol s, is the SI unit of time. It is defined by taking the fixed numerical value of the caesium frequency, {\displaystyle \Delta \nu _{\mathsf {Cs}}}, the unperturbed ground-state hyperfine transition frequency of the caesium 133 atom, to be 9192631770 when expressed in the unit Hz, which is equal to s−1.

    This definition is the basis for the system of International Atomic Time (TAI), which is maintained by an ensemble of atomic clocks around the world. The system of Coordinated Universal Time (UTC) that is the basis of civil time implements leap seconds to allow clock time to track changes in Earth's rotation to within one second while being based on clocks that are based on the definition of the second.

     The main variety of atomic clock uses caesium atoms cooled to temperatures that approach absolute zero. 

  • What are you trying to say now? That the computer monitoring the clock needs to know the time to monitor the clock?

  • No I don't. I don't have access to an atomic clock.

    You can pick one up for $20US and hang it on the wall.  As I said, it gets the time from something like WWV, and displays it.  It needs to use the TZ and DST setting.

    Maybe they aren't called atomic clocks where you live.  Maybe Radio Controlled Clock?

  • hahahaha. for the love of all that is sacred, that is a clock connected to a timeserver or radio signal that tells the time. That isn't an atomic clock. Sure, that needs something to know how to display the time. But that isn't an atomic clock. It may be linked to a network that derives it time from an atomic clock.

    Look into the NTP protocol for example.

    en.wikipedia.org/.../Radio_clock

  • Sorry, but here in the US, they are commonly called an "Atomic Clock" and have been for many years.

    Now you are just being contrary!

    I'm done.

  • yes and you are wrong by calling it an atomic clock.