Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2024-06/msg00201.html
* lib/strftime.c (strftime) [!_LIBC]: Move #undef up.
(underlying_strftime) [!_LIBC]: New function, containing most of
what __strftime_internal used to do at the underlying_strftime label.
(get_tm_zone): New function, containing much of what
__strftime_internal used to do for %Z.
Be consistent about using "UTC" rather than "GMT";
this changes behavior only on platforms lacking tm_zone.
(__strftime_internal): Use them to compute time zone abbreviation
when needed. Make ‘zone’ more local, and compute it only if
needed. Simplify by removing set_and_revert_tz local var and its
uses; no longer needed now that we have get_tm_zone. Do not
assume %EZ and %OZ are equivalent to %Z.