[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#799476: libc6: strftime should allow extended-format timezone (ISO 8601)



Package: libc6
Version: 2.31-10
Followup-For: Bug #799476
X-Debbugs-Cc: tg@mirbsd.de
Control: tags 799476 + upstream

Incidentally, I came here to report precisely this (strftime(3) and date(1)
not consistent wrt. GNU extensions). I’ve since added %-d and %:z to MirBSD
libc’s strftime(3) — whose date(1) uses that.

I’ve noticed that trying to use %:z in a locale category fails, but passing
it directly to date(1) works:

$ LC_TIME=de_DE.UTF-8 date +"$(LC_TIME=de_DE.UTF-8@iso8601 locale d_t_fmt)"
2021-04-04T21:34:31+02:00 (CEST), 2021-W13-7 (So)
$ LC_TIME=de_DE.UTF-8@iso8601 date +%c
2021-04-04T21:34:35%:z (CEST), 2021-W13-7 (So)

I thought I could get by with using "%Y-%m-%dT%H:%M:%S%z (%Z), %G-W%V-%u (%a)"
but the OP makes a good point that mixing basic and extended formats is not
permitted either.

Please forward this upstream so it’ll be implemented. Thanks!

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'oldstable-updates'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-4-amd64 (SMP w/2 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/lksh
Init: sysvinit (via /sbin/init)

Versions of packages libc6 depends on:
ii  libcrypt1  1:4.4.18-2
ii  libgcc-s1  10.2.1-6

Versions of packages libc6 recommends:
ii  libidn2-0       2.3.0-5
ii  libnss-nis      3.1-4
ii  libnss-nisplus  1.3-4

Versions of packages libc6 suggests:
ii  debconf [debconf-2.0]  1.5.76
ii  glibc-doc              2.31-10
ii  libc-l10n              2.31-10
ii  locales                2.31-10

-- debconf information:
  glibc/kernel-too-old:
  glibc/restart-services:
* glibc/upgrade: true
  glibc/disable-screensaver:
  glibc/kernel-not-supported:
* libraries/restart-without-asking: true
  glibc/restart-failed:

Reply to: