git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git.git object database at kernel.org?

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Apr 25, 2005, 19:05 UTC
Message-ID
<426D3F88.9050709@zytor.com>
In-Reply-To
<426D3B01.8060408@zytor.com>
H. Peter Anvin wrote:
Show 13 quoted lines
> Linus Torvalds wrote:
> 
>>    NOTE! The fact that "mktime()" seems to depend on the timezone in 
>> which    it is made seems to make this questionable. I had always 
>> assumed that    mktime would take the timezone from the "struct tm", 
>> and thus be    reliable, but somebody seems to have shown that that is 
>> not the case at    all!
> 
> No, mktime() always uses the local time zone.  It's the inverse of 
> localtime().  If you know the timezone offset (e.g. if you have a RFC 
> 2822-style date) then you're probably better off rolling your own; 
> otherwise setenv("TZ"); tzset(); mktime(); is of course also doable.
> 
BTW, curl_getdate() from libcurl is a good multiformat date parser.
	-hpa
Previous: H. Peter AnvinNext: Linus Torvalds
Message 3 of 7 in “Re: git.git object database at kernel.org?”
  1. Linus TorvaldsApr 24, 2005
  2. H. Peter AnvinApr 25, 2005
  3. H. Peter AnvinApr 25, 2005
  4. Linus TorvaldsApr 26, 2005
  5. H. Peter AnvinApr 26, 2005
  6. Linus TorvaldsApr 26, 2005
  7. H. Peter AnvinApr 26, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.