diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1999-11-13 20:04:41 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1999-11-13 20:04:41 +0000 |
commit | 3973dacdb3c1352e59e625aec18dba27a01461bc (patch) | |
tree | f91cc7a7248d536f4ef62308b71d193f38ed8bd1 /contrib | |
parent | 2a478ba2f929f00163157d8d356a88e6820d5ea1 (diff) | |
download | src-3973dacdb3c1352e59e625aec18dba27a01461bc.tar.gz src-3973dacdb3c1352e59e625aec18dba27a01461bc.zip |
Fix time printing bug
PR: 14813
Submitted by: idea by netch@lucky.net (Valentin Nechayev)
Notes
Notes:
svn path=/head/; revision=53129
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/perl5/ext/POSIX/POSIX.xs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/perl5/ext/POSIX/POSIX.xs b/contrib/perl5/ext/POSIX/POSIX.xs index 15e026e212b2..093cc9957797 100644 --- a/contrib/perl5/ext/POSIX/POSIX.xs +++ b/contrib/perl5/ext/POSIX/POSIX.xs @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ #ifdef WIN32 #define _POSIX_ #endif @@ -3619,7 +3620,9 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) char tmpbuf[128]; struct tm mytm; int len; +#ifndef __FreeBSD__ init_tm(&mytm); /* XXX workaround - see init_tm() above */ +#endif mytm.tm_sec = sec; mytm.tm_min = min; mytm.tm_hour = hour; @@ -3629,7 +3632,12 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) mytm.tm_wday = wday; mytm.tm_yday = yday; mytm.tm_isdst = isdst; +#ifdef __FreeBSD__ + mytm.tm_gmtoff = 0; + mytm.tm_zone = "???"; +#else (void) mktime(&mytm); +#endif len = strftime(tmpbuf, sizeof tmpbuf, fmt, &mytm); /* ** The following is needed to handle to the situation where |