You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's unclear to me which of the compile time definitions are set. It seems than in FreeBSD these are set in tzconfig.h. It seems that that code was not imported in 65d666e, which might mean that all of them are unset, which looks like it would fall though all the tests and skip over %z resulting in the observed behaviour.
The text was updated successfully, but these errors were encountered:
wezm
changed the title
date(1) does not include timezone
date(1) does not include timezone in some cases
Jul 15, 2023
The
date(1)
man page says that the timezone should be included when passing-Iseconds
or-R
but I'm always getting no timezone:I confirmed it works as documented on a FreeBSD 13.2 system:
For
-I
this is howdate
attempts to get the time zone:chimerautils/src.freebsd/coreutils/date/date.c
Lines 241 to 246 in eb01fbc
When
strftime_bsd
processes%z
it does a number of checks:The first is:
chimerautils/src.freebsd/compat/strftime.c
Line 457 in eb01fbc
In my testing
localtime()
is returning astruct tm
withtm_isdst
set to 0, so it should get past this condition and into this:chimerautils/src.freebsd/compat/strftime.c
Lines 459 to 493 in eb01fbc
It's unclear to me which of the compile time definitions are set. It seems than in FreeBSD these are set in tzconfig.h. It seems that that code was not imported in 65d666e, which might mean that all of them are unset, which looks like it would fall though all the tests and skip over
%z
resulting in the observed behaviour.The text was updated successfully, but these errors were encountered: