On 12/12/17 15:16, Michael H Deckers via tz wrote:
On 2017-12-10 22:16, Paul Eggert wrote:
Michael H Deckers via tz wrote:
The definition of the tm_isdst flag does not even mention standard time True, but other parts of POSIX make it clear that when tm_isdst is zero, standard time is intended. See: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_...
and look at the TZ environment variable: POSIX says that its first few letters correspond to standard time and that later letters correspond to daylight saving time.
The meaning of fields in a POSIX TZ string does not define the meaning of the tm_isdst member of struct tm, which is only a matter of the C standard; POSIX cannot modify that meaning (they can only add extensions).
Michael Deckers.
POSIX does define the meaning of the tm_isdst member (The Open Group Base Specifications Issue 7 says: "The value of tm_isdst shall be positive if Daylight Savings Time is in effect, 0 if Daylight Savings Time is not in effect, and negative if the information is not available."). This seems to be slightly inconsistent with its description of the "dst" part of the TZ environment variable, which designates the alternative (such as Daylight Savings Time) timezone. To make it consistent, I think POSIX should describe tm_isdst as indicating whether the alternative (such as Daylight Savings Time) timezone is in effect, or not, or undetermined. The C standard does not define "standard time" at all. It does say that tm_isdst is set to 1 when "Daylight Saving Time" is in effect, but defines "Daylight Saving Time" as "a temporary change in the algorithm for determining local time." -- -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-