bin/102121: strftime(3) fails on certain dates

Jukka A. Ukkonen jau at iki.fi
Wed Aug 16 09:30:17 UTC 2006


The following reply was made to PR bin/102121; it has been noted by GNATS.

From: jau at iki.fi (Jukka A. Ukkonen)
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: bin/102121: strftime(3) fails on certain dates
Date: Wed, 16 Aug 2006 12:26:45 +0300 (EEST)

 	Oops!
 
 	I was a bit too hasty (and definitely too tired) to write
 	the PR last night.
 
 	The true culprit is strptime() that already parses the date
 	"Tue, 15 Aug 2006 23:48:36 +0300 (EEST)" wrong producing
 	1597464000 on return, though the correct value should be
 	1155674916. (The offset here amounts to roughly 14 years.
 	I.e. 2020 instead of 2006.)
 
 	So, blame it on strptime(3) instead.
 
 
 	Cheers,
 		// jau
 .---  ..-  -.-  -.-  .-    .-  .-.-.-    ..-  -.-  -.-  ---  -.  .  -.
   /    Jukka A. Ukkonen,                             Oxit Ltd, Finland
  /__   M.Sc. (sw-eng & cs)                    (Phone) +358-500-606-671
    /   Internet: Jukka.Ukkonen(a)Oxit.Fi        (Home) +358-9-6215-280
   /    Internet: jau(a)iki.fi
  v
         .---  .-  ..-  ...-.-  ..  -.-  ..  .-.-.-  ..-.  ..
 + + + + My opinions are mine and mine alone, not my employers. + + + +


More information about the freebsd-bugs mailing list