[tz] Ethiopia local time

Guy Harris guy at alum.mit.edu
Wed Sep 12 23:20:53 UTC 2018


On Sep 12, 2018, at 3:42 PM, Steven R. Loomis <srl at icu-project.org> wrote:

> For what it's worth, CLDR is tracking this issue at https://unicode.org/cldr/trac/ticket/9716 — my current thinking is to have something called a "time cycle", but it would be applied on top of the time zone calculation. Supporting it if it were  UTC-3 has other problems.  
> 
> I think it should be considered a localization and not a time zone issue.

And, for what it's worth, the original client of the tzdb, and still one of the major clients of the tzdb, is the localtime() routine; the C90 standard says:

	7.12 Date and time <time.h>

	7.12.1 Components of time

	     The header <time.h> defines two macros, and declares four types and several functions for manipulating time. Many functions deal with a calendar time that represents the current date (according to the Gregorian calendar) and time. Some functions deal with local time, which is the calendar time expressed for some specific time zone, and with Daylight Saving Time, which is a temporary change in the algorithm for determining local time. The local time zone and Daylight Saving Time are implementation-defined.

		...

	     The types declared are size_t (described in 7.1.6);

		...

	... and

		struct tm

	which holds the components of a calendar time, called the broken-down time. The structure shall contain at least the following members, in any order. The semantics of the members and their normal ranges are expressed in the comments.

		...
		int tm_hour;	/* hours since midnight — [0 23] */
		...

This means that tm_hour has to be 0 at midnight, even if people in some locale call it 6:00 or 18:00, just as it has to be 0 at midnight, even though people in some locale call it 12:00 AM.

So I agree that this is a localization issue, and that APIs for displaying time for human purposes should support showing midnight as 6:00 (or whatever form is used in those locales) if those APIs are sufficiently localized to support a 12-hour clock (i.e., if you can show USans midnight as 12:00 AM, you should also be able to show Ethiopians midnight as 6:00 or 18:00 or however it's displayed there).


More information about the tz mailing list