diff options
| author | Garrett Wollman <wollman@FreeBSD.org> | 2001-06-05 20:13:28 +0000 |
|---|---|---|
| committer | Garrett Wollman <wollman@FreeBSD.org> | 2001-06-05 20:13:28 +0000 |
| commit | 80d444c883599cb6c16624734ad25b18d9e44b12 (patch) | |
| tree | 2c756197a9b79f0869bd71ef7a27e5dc095efd3a /lib | |
| parent | ba8aae1baff78e75bc76bcdc62bb7dd7e7191747 (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc/stdtime/localtime.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c index 92541c501bbb..eaee232b5322 100644 --- a/lib/libc/stdtime/localtime.c +++ b/lib/libc/stdtime/localtime.c @@ -1449,7 +1449,9 @@ int * const okayp; } if (increment_overflow(&yourtm.tm_year, -TM_YEAR_BASE)) return WRONG; - if (yourtm.tm_year + TM_YEAR_BASE < EPOCH_YEAR) { + if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN) + saved_seconds = 0; + else if (yourtm.tm_year + TM_YEAR_BASE < EPOCH_YEAR) { /* ** We can't set tm_sec to 0, because that might push the ** time below the minimum representable time. |
