Skip to content

Commit

Permalink
Merge pull request #11 from JohnoKing/leap-seconds
Browse files Browse the repository at this point in the history
Fix two more problems with time zones and epoch handling
  • Loading branch information
McDutchie authored Jun 14, 2020
2 parents ff01ecd + 51f97cf commit 5498d9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/ksh93/edit/history.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ static int hist_write(Sfio_t *iop,const void *buff,register int insize,Sfdisc_t*
if(hp->auditfp)
{
time_t t=time((time_t*)0);
sfprintf(hp->auditfp,"%u;%u;%s;%*s%c",sh_isoption(SH_PRIVILEGED)?shgd->euserid:shgd->userid,t,hp->tty,size,buff,0);
sfprintf(hp->auditfp,"%u;%lu;%s;%*s%c",sh_isoption(SH_PRIVILEGED)?shgd->euserid:shgd->userid,(unsigned long)t,hp->tty,size,buff,0);
sfsync(hp->auditfp);
}
#endif /* SHOPT_AUDIT */
Expand Down
3 changes: 3 additions & 0 deletions src/lib/libast/tm/tmdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ static short sum[] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 36

static Tm_leap_t leap[] =
{
1483228826, 27, /* 2016-12-31+23:59:60-0000 */
1435708825, 26, /* 2015-06-30+23:59:60-0000 */
1341100824, 25, /* 2012-06-30+23:59:60-0000 */
1230768023, 24, /* 2008-12-31+23:59:60-0000 */
1136073622, 23, /* 2005-12-31+23:59:60-0000 */
915148821, 22, /* 1998-12-31+23:59:60-0000 */
Expand Down

0 comments on commit 5498d9e

Please sign in to comment.