[tz] OpenJDK/CLDR/ICU/Joda issues with Ireland change
Brian Inglis
Brian.Inglis at SystematicSw.ab.ca
Mon Jan 29 23:55:38 UTC 2018
On 2018-01-29 10:49, Paul Eggert wrote:
> On 01/29/2018 04:23 AM, Michael H Deckers wrote:
>> Everybody can convince themselves about what POSIX is saying by looking at
>
> All I can say is that that you're misinterpreting POSIX here. You can ask the
> standardization committee for an official interpretation if you like. There are
> lots of places where POSIX deliberately does not specify behavior, but this
> isn't one of them.
I think POSIX defers to C and much here is implementation defined, except where
specified by POSIX, so please notice that tm_isdst may be positive not just -1,
0, 1; any number of names could be supported; if a "generic" CLDR time zone name
or abbreviation is available, it /could possibly/ be provided as a default in
case tm_isdst is returned as -1, for some reason other than determining the time
zone:
"
ISO/IEC 9899-2011[2012]
...
Information technology -- Programming languages -- C
...
7.27.1 Components of time
...
int tm_isdst; // Daylight Saving Time flag
The value of tm_isdst is positive if Daylight Saving Time is in effect, zero if
Daylight Saving Time is not in effect, and negative if the information is not
available.
...
7.27.2.3 The mktime function
...
320) Thus, a positive or zero value for tm_isdst causes the mktime function to
presume initially that Daylight Saving Time, respectively, is or is not in
effect for the specified time. A negative value causes it to attempt to
determine whether Daylight Saving Time is in effect for the specified time.
...
7.27.3.5 The strftime function
...
%z is replaced by the offset from UTC in the ISO 8601 format "-0430" (meaning 4
hours 30 minutes behind UTC, west of Greenwich), or by no characters if no time
zone is determinable. [tm_isdst]
%Z is replaced by the locale's time zone name or abbreviation, or by no
characters if no time zone is determinable. [tm_isdst]
"
One of my systems is configured so that all date/time utilities and functions
output or return:
$ date +%c%z
2018 Jan 29 Mon 16:45:30-0700
which is how I would prefer to see long date/times everywhere in /my/ locale.
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
More information about the tz
mailing list