From: "H. Peter Anvin" <hpa@zytor•com>
To: "H. Peter Anvin" <hpa@zytor•com>
Cc: Linus Torvalds <torvalds@osdl•org>,
Git Mailing List <git@vger•kernel.org>,
Junio C Hamano <junkio@cox•net>
Subject: Re: git.git object database at kernel.org?
Date: Mon, 25 Apr 2005 12:05:44 -0700 [thread overview]
Message-ID: <426D3F88.9050709@zytor.com> (raw)
In-Reply-To: <426D3B01.8060408@zytor.com>
H. Peter Anvin wrote:
> 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
next prev parent reply other threads:[~2005-04-25 19:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7vhdhvstb2.fsf@assigned-by-dhcp.cox.net>
2005-04-24 23:08 ` git.git object database at kernel.org? Linus Torvalds
2005-04-25 18:46 ` H. Peter Anvin
2005-04-25 19:05 ` H. Peter Anvin [this message]
2005-04-26 0:32 ` Linus Torvalds
2005-04-26 0:48 ` H. Peter Anvin
2005-04-26 0:58 ` Linus Torvalds
2005-04-26 1:05 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=426D3F88.9050709@zytor.com \
--to=hpa@zytor$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=junkio@cox$(echo .)net \
--cc=torvalds@osdl$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox