lots of questions about strftime()

DSTONE at WL9.Prime.COM DSTONE at WL9.Prime.COM
Fri Aug 17 02:37:00 AEST 1990



Can anybody explain why the %U and %W specifiers of strftime are
defined as they are? ISO 8601, which defines ISO week numbers,
says that weeks begin on Monday and that week 1 is that week
containing the first Thursday of the year. It also says that
Monday is day 1 of the week, not 0 as the %w specifier gives.
Moreover, also unlike %U and %W, there is no ISO week 0:
any days in a year before week belong to week 52 or 53
of the previous year.

Is there some ANSI standard which keeps the USA out of line from the
international standard?

Another question: does %Z reflect the daylight saving setting
shown by tm_isdst? In other words, does it return (for example)
"EDT" rather then "EST" in the summer? Or must it always return
the basic time zone abbreviation (here "EST") if any?

David Stone
<dstone at wl9.prime.com>
speaking for myself only.



More information about the Comp.std.c mailing list