Skip to content

Commit

Permalink
Merge pull request #8 from JohnoKing/fix-freebsd-date
Browse files Browse the repository at this point in the history
Backport the ksh2020 fix for timezone name determination

Partial fix for #6.
  • Loading branch information
McDutchie committed Jun 13, 2020
2 parents a739115 + d7c9470 commit 76f7d15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ For full details, see the git log at:

Any uppercase BUG_* names are modernish shell bug IDs.

2020-06-13:
- Fixed a timezone name determination bug on FreeBSD that caused the
output from `LC_ALL=C printf '%T' now` to print the wrong time zone name.

2020-06-11:

- Fixed a bug that caused running 'builtin -d' on a special builtin to
Expand Down
10 changes: 2 additions & 8 deletions src/lib/libast/tm/tminit.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,6 @@ tmlocal(void)
else if (e)
environ[0] = e;
}
#endif
#if _dat_tzname
local.standard = strdup(tzname[0]);
local.daylight = strdup(tzname[1]);
#endif
tmlocale();

Expand Down Expand Up @@ -296,10 +292,8 @@ tmlocal(void)
* POSIX
*/

if (!local.standard)
local.standard = strdup(tzname[0]);
if (!local.daylight)
local.daylight = strdup(tzname[1]);
local.standard = strdup(tzname[0]);
local.daylight = strdup(tzname[1]);
}
else
#endif
Expand Down

0 comments on commit 76f7d15

Please sign in to comment.