2024-06-16 Paul Eggert <eggert@cs.ucla.edu>
+ nstrftime: omit never-used code
+ * lib/strftime.c (__strftime_internal): Remove code protected by
+ ‘#ifndef my_strftime’. my_strftime is always defined. This
+ code isn’t needed for POSIX conformance as it’s never used in glibc.
+
nstrftime,time_rz: don’t depend on tzname
* lib/strftime.c (HAVE_TZNAME_ARRAY) [_LIBC]: Remove.
All uses removed.
underlying strftime with %Z, making sure that call to the
underlying strftime is now always compiled in the non-glibc case.
Set and revert TZ as needed around the underlying call.
+
* lib/time-internal.h (struct tm_zone)
[HAVE_TZNAME_ARRAY && !HAVE_STRUCT_TM_TM_ZONE]: Remove tzname_copy.
All uses removed.
struct tm ltm;
time_t lt;
- /* POSIX.1 requires that local time zone information be used as
- though strftime called tzset. */
-# ifndef my_strftime
- if (!*tzset_called)
- {
- tzset ();
- *tzset_called = true;
- }
-# endif
-
ltm = *tp;
ltm.tm_wday = -1;
lt = mktime_z (tz, <m);