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

Re: [PATCH 1/3] Move Git::SVN::get_tz to Git::get_tz_offset

From
Ben Walton <bdwalton@gmail.com>
Date
Jan 16, 2013, 20:16 UTC
Message-ID
<CAP30j164UD9gNRbZ=uCQjgpDODWnGtYmHcWES2P=YPryL=FbZA@mail.gmail.com>
In-Reply-To
<7vehhlyw90.fsf@alter.siamese.dyndns.org>
On Wed, Jan 16, 2013 at 3:37 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> Ben Walton <bdwalton@gmail.com> writes:
>
>> +sub get_tz_offset {
>> +     # some systmes don't handle or mishandle %z, so be creative.
>
> Hmph.  I wonder if we can use %z if it is handled correctly and fall
> back to this code only on platforms that are broken?

That would be perfectly acceptable to me. The reason I set it up to always run through this function here is that when I originally added this function for git-svn, I'd made it conditional and Eric Wong preferred that the function be used exclusively[1]. I opted to take the same approach here to keep things congrous.

If it were to be conditional, I think I'd add a variable to the build system and have the code leverage that at runtime instead of the try/except approach I attempted in 2009.

Thanks -Ben

[1] http://lists-archives.com/git/683572-git-svn-fix-for-systems-without-strftime-z.html -- --------------------------------------------------------------------------------------------------------------------------- Take the risk of thinking for yourself. Much more happiness, truth, beauty and wisdom will come to you that way.

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

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 13 in “Fix a portability issue with git-cvsimport”
  1. 0/3 Fix a portability issue with git-cvsimportBen Walton, Jan 15, 2013
  2. 1/3 Move Git::SVN::get_tz to Git::get_tz_offsetBen Walton, Jan 15, 2013
  3. Junio C HamanoJan 16, 2013
  4. Ben WaltonJan 16, 2013
  5. Junio C HamanoJan 16, 2013
  6. 2/3 Allow Git::get_tz_offset to properly handle DST boundary timesBen Walton, Jan 15, 2013
  7. Junio C HamanoJan 17, 2013
  8. Ben WaltonJan 20, 2013
  9. Junio C HamanoJan 20, 2013
  10. 3/3 Avoid non-portable strftime format specifiers in git-cvsimportBen Walton, Jan 15, 2013
  11. Chris RorvickJan 16, 2013
  12. Ben WaltonJan 16, 2013
  13. Junio C HamanoJan 15, 2013

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.