git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russ Allbery <rra@stanford.edu>
To: Edgar Toernig <froese@gmx.de>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Linus Torvalds <torvalds@osdl.org>,
	git@vger.kernel.org
Subject: Re: Trying to use AUTHOR_DATE
Date: Sat, 30 Apr 2005 11:10:38 -0700	[thread overview]
Message-ID: <87r7gs87a9.fsf@windlord.stanford.edu> (raw)
In-Reply-To: <20050430124048.79119cac.froese@gmx.de> (Edgar Toernig's message of "Sat, 30 Apr 2005 12:40:48 +0200")

Edgar Toernig <froese@gmx.de> writes:

> Oh btw, when we are about sucking time functions: the %s and %z
> strftime- sequences used further down are also non-standard (POSIX has
> no %s, old libc has neither %s nor %z).

> A possible workaround:

[...]

> 	tm = localtime(&now); /* get timezone and tm_isdst */
> 	tz = -timezone / 60;
> 	if (tm->tm_isdst > 0)
> 		tz += 60;

The global timezone variable isn't available on all systems.  :)

You really cannot get portable behavior in this area without something
akin to Autoconf probes, unfortunately.  Oh, and you can't assume daylight
savings time is an hour; it is sometimes two hours.  You have to instead
use the altzone variable to get the offset when you're in daylight savings
time, but this again isn't available on all systems.

I posted a pointer to the INN source a while back; I'm really not sure
that anything less is sufficient to get full portability, although I
certainly trust Paul Eggart's implementation.

BTW, the yacc-based thing is exactly what I wrote the INN code to get rid
of, since I didn't want a yacc dependency.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

  reply	other threads:[~2005-04-30 18:05 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-30  3:44 Trying to use AUTHOR_DATE Luck, Tony
2005-04-30  3:49 ` H. Peter Anvin
2005-04-30  4:02   ` Linus Torvalds
2005-04-30  4:22     ` Linus Torvalds
2005-04-30  4:32       ` Russ Allbery
2005-04-30  8:02         ` David Woodhouse
2005-04-30 10:40           ` Edgar Toernig
2005-04-30 18:10             ` Russ Allbery [this message]
2005-04-30 20:32               ` Linus Torvalds
2005-04-30 21:59                 ` Juliusz Chroboczek
2005-04-30 22:54                 ` Edgar Toernig
2005-04-30 23:18                   ` Linus Torvalds
2005-05-01 16:46                   ` Linus Torvalds
2005-05-01 16:57                     ` Randy.Dunlap
2005-05-01 17:23                     ` Edgar Toernig
2005-04-30  5:43       ` Junio C Hamano
2005-04-30 10:53       ` Edgar Toernig
2005-04-30 11:13         ` David Woodhouse
2005-04-30 12:08           ` Kay Sievers
2005-04-30 12:13             ` David Woodhouse
2005-04-30 12:49           ` Edgar Toernig
2005-04-30 12:59             ` David Woodhouse
2005-04-30 13:22               ` Edgar Toernig
2005-05-02 22:10               ` Krzysztof Halasa
2005-05-02 22:26                 ` H. Peter Anvin
2005-05-02 23:30                   ` Krzysztof Halasa
2005-05-02 23:32                     ` H. Peter Anvin
2005-05-03  0:30                       ` Krzysztof Halasa
2005-05-03  0:38                         ` H. Peter Anvin
2005-04-30 23:14           ` H. Peter Anvin
2005-04-30  4:50 ` Edgar Toernig
  -- strict thread matches above, loose matches on Subject: below --
2005-04-30  5:28 Luck, Tony
2005-04-30 23:14 ` H. Peter Anvin
2005-04-29 23:14 tony.luck
2005-04-29 23:35 ` H. Peter Anvin
2005-04-30  0:21   ` tony.luck
2005-04-30  3:23     ` Edgar Toernig
2005-04-30  3:47       ` 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=87r7gs87a9.fsf@windlord.stanford.edu \
    --to=rra@stanford.edu \
    --cc=dwmw2@infradead.org \
    --cc=froese@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).