linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] debugfs: fix string_to_time for MacOS strptime()
Date: Thu, 22 May 2014 17:53:03 -0400	[thread overview]
Message-ID: <20140522215303.GC11448@thunk.org> (raw)
In-Reply-To: <1400625070-61813-1-git-send-email-adilger@dilger.ca>

On Tue, May 20, 2014 at 04:31:10PM -0600, Andreas Dilger wrote:
> The strptime() function does not update fields in struct tm that are
> not specified in the input format.  The glibc implementation sets the
> tm_yday field (%j) when any of the year (%Y), month (%m), or day (%d)
> fields are changed, but the MacOS strptime() does not set tm_yday in
> this case.  This caused string_to_time() to calculate the wrong Unix
> epoch on MacOS. If tm_yday is unset, compute it in string_to_time().
> 
> Signed-off-by: Andreas Dilger <adilger@dilger.ca>

Thanks, applied.

						- Ted

      reply	other threads:[~2014-05-22 21:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20 22:31 [PATCH] debugfs: fix string_to_time for MacOS strptime() Andreas Dilger
2014-05-22 21:53 ` Theodore Ts'o [this message]

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=20140522215303.GC11448@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.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).