git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ben Walton <bdwalton@gmail.com>
To: Chris Rorvick <chris@rorvick.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	esr@thyrsus.com, git <git@vger.kernel.org>
Subject: Re: [PATCH 3/3] Avoid non-portable strftime format specifiers in git-cvsimport
Date: Wed, 16 Jan 2013 10:38:09 +0000	[thread overview]
Message-ID: <CAP30j153s970=2WKqxWTVGRAaJ9jEXg9ETF8OFU=-nDK=BAxfg@mail.gmail.com> (raw)
In-Reply-To: <CAEUsAPZakGKUmQWrsTaF1cpbQm0Y4C3sDxCWD_i1gkQxeC-bRQ@mail.gmail.com>

On Wed, Jan 16, 2013 at 1:53 AM, Chris Rorvick <chris@rorvick.com> wrote:
> On Tue, Jan 15, 2013 at 5:10 PM, Ben Walton <bdwalton@gmail.com> wrote:
>> Neither %s or %z are portable strftime format specifiers.  There is no
>> need for %s in git-cvsimport as the supplied time is already in
>> seconds since the epoch.  For %z, use the function get_tz_offset
>> provided by Git.pm instead.
>
> Out of curiosity, which platforms are affected?  Assuming DST is a 1
> hour shift (patch 2/3) is not necessarily portable either, though this
> currently appears to only affect a small island off of the coast of
> Australia.  :-)

My primary motivation on this change was for solaris.  %s isn't
supported in 10 (not sure about 11) and %z was only added in 10.  The
issue affects other older platforms as well.

Good point about the 1 hour assumption.  Is it worth hacking in
additional logic to handle Lord Howe Island?  I think it's likely a
case of "in for a penny, in for a pound" but that could lead to
madness when it comes to time zones.  Either way, the function behaves
better now than before.

(I wasn't aware of the half hour oddball wrt to DST, so I learned
something new here too!)

Thanks
-Ben
--
---------------------------------------------------------------------------------------------------------------------------
Take the risk of thinking for yourself.  Much more happiness,
truth, beauty and wisdom will come to you that way.

-Christopher Hitchens
---------------------------------------------------------------------------------------------------------------------------

  reply	other threads:[~2013-01-16 10:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 23:10 [PATCH 0/3] Fix a portability issue with git-cvsimport Ben Walton
2013-01-15 23:10 ` [PATCH 1/3] Move Git::SVN::get_tz to Git::get_tz_offset Ben Walton
2013-01-16 15:37   ` Junio C Hamano
2013-01-16 20:16     ` Ben Walton
2013-01-16 20:36       ` Junio C Hamano
2013-01-15 23:10 ` [PATCH 2/3] Allow Git::get_tz_offset to properly handle DST boundary times Ben Walton
2013-01-17 19:09   ` Junio C Hamano
2013-01-20 20:06     ` Ben Walton
2013-01-20 21:03       ` Junio C Hamano
2013-01-15 23:10 ` [PATCH 3/3] Avoid non-portable strftime format specifiers in git-cvsimport Ben Walton
2013-01-16  1:53   ` Chris Rorvick
2013-01-16 10:38     ` Ben Walton [this message]
2013-01-15 23:43 ` [PATCH 0/3] Fix a portability issue with git-cvsimport Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2013-02-09 21:46 Ben Walton
2013-02-09 21:46 ` [PATCH 3/3] Avoid non-portable strftime format specifiers in git-cvsimport Ben Walton
2013-02-09 22:20   ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP30j153s970=2WKqxWTVGRAaJ9jEXg9ETF8OFU=-nDK=BAxfg@mail.gmail.com' \
    --to=bdwalton@gmail.com \
    --cc=chris@rorvick.com \
    --cc=esr@thyrsus.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).