[tz] Timezone in Brazil

Guy Harris guy at alum.mit.edu
Sun Oct 11 02:09:50 UTC 2015

On Oct 9, 2015, at 12:43 PM, Matt Johnson <mj1856 at hotmail.com> wrote:

> Hi Marcio!
> "Metazone" is a CLDR term. See:
> http://www.unicode.org/reports/tr35/tr35-dates.html#Metazone_Names
> http://unicode.org/repos/cldr/trunk/common/supplemental/metaZones.xml

Speaking of the CLDR, presumably, in


when it says

	Generic location format: Reflects "wall time": a primary function of this format type is to represent a time zone in a list or menu for user selection of time zone, since the naming is more uniform than the generic non-location format and zones for the same country will be grouped together (and could be organized hierarchically by country if desired). It is also a fallback format when there is no translation for the generic non-location format.

		* "Los Angeles Time"
		* "Italy Time".

	Note: A generic location format is constructed by a part of time zone ID representing an exemplar city name or its country as the final fallback.

"final fallback" means "only if there is nothing else available as a name representing the time zone", so that, for example, in a Brazilian Portuguese locale, the tzdb zone "America/Sao_Paulo" is represented as "Hora de Brasilia" rather than using the final fallback and ending up with something containing "Paulo", and, in a US English locale, the tzdb zone "America/Los_Angeles" is represented as "Pacific Time (US)" or something such as that.

I am currently about 500 km from Los Angeles, and my clock is not on "Los Angeles Time", it's on Pacific Time (with DST being honored).  Fortunately, the OS on which I'm typing this - which makes significant use of the CLDR - never offers me "Los Angeles Time" as the appropriate time zone for me.  (It often likes speaking of "Cupertino" in that process, which should suggest what OS it is. :-))

Its time zone selector, using Location Services, correctly determines that the closest city to me is Palo Alto (which is where I am), and, in the drop-down box, offers a choice of California and Nevada cities, as well as Tijuana. (The choice doesn't include every city in California; I think it filters out nearby cities.) It offers those, rather than offering a time zone name, in the drop-down box, although if you either select a city or type one in, it displays the current time zone name - "Pacific Daylight Time", currently, and you can click to switch between the full name and the abbreviation.

It displays "Brasilia Standard Time" if I type in either Brasilia, São Paulo, or Rio de Janeiro (or, I suspect, other cities in the main Brazilian time zone).

The correct meta-algorithm for deciding how a time zone selection algorithm should work is:

	IF you can get location information and can map location information to a tzid

		use that to find the appropriate tzid, and offer the user an option to disable that;

	ELSEIF (you can't OR the user told you not to) AND you can provide a list of cities/other locations (*multiple* cities per tzdb zone, if there are multiple cities; don't just give the exemplar city) AND you can map those locations to tzids

		let the user select from a list of cities/other locations

	ELSEIF you at least have a list of tzids AND you can map them to the locale's name for the zone

		let the user select from a list of localized names for the zone (e.g., "Hora de Brasilia", not "Hora de São Paulo" or something such as that)


		you may be stuck with presenting exemplar cities or tzids, but really try not to get stuck there

More information about the tz mailing list