This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug time/17189] Incorrect result for %s in strftime
- From: "quae at daurnimator dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 20 Nov 2015 00:13:07 +0000
- Subject: [Bug time/17189] Incorrect result for %s in strftime
- Auto-submitted: auto-generated
- References: <bug-17189-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17189
--- Comment #2 from daurnimator <quae at daurnimator dot com> ---
> This is the documented behavior in the manual:
> Calling 'strftime' also sets the current time zone as if 'tzset'
> were called; 'strftime' uses this information instead of
> BROKENTIME's 'tm_gmtoff' and 'tm_zone' members.
The %s specifier is defined as printing the **UTC timestamp**. From the man
page:
%s The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000
(UTC). (TZ)
In reality, it prints the UTC timestamp, but adjusted for the local time
offset.
This is wrong (and not as documented)
At the very least this means we have a documentation bug.
--
You are receiving this mail because:
You are on the CC list for the bug.