All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Packham <judge.packham@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH v1 0/1] Include timezone information in build
Date: Sun, 10 May 2015 21:28:29 +1200	[thread overview]
Message-ID: <CAFOYHZCRWVBRPWrL7Qfa_fPrJer=1+nzYPZnmqRCYeVFRmwxgQ@mail.gmail.com> (raw)
In-Reply-To: <20150508210502.GU5267@bill-the-cat>

Hi Tom,

On Sat, May 9, 2015 at 9:05 AM, Tom Rini <trini@konsulko.com> wrote:
> On Thu, Apr 30, 2015 at 12:38:22PM +1200, Chris Packham wrote:
>> Hi,
>>
>>
>> Recently an eagle-eyed tester pointed out to me that the build time
>> reported in my u-boot build did not match the file timestamp on the
>> server it was stored on. This is because at $dayjob we have a build farm
>> with times set to UTC while the storage server was displaying the local
>> time. In reality the times were the same but the timezones were not and
>> there is no indication in the u-boot version about how to interpret the
>> time.
>>
>> This is my attempt to address the issue by defining U_BOOT_TZ along side
>> U_BOOT_TIME and U_BOOT_DATE. I've kept the TZ portion separate because I
>> thought there might some push pack on changing the version string. For
>> my purposes I can display the TZ separately as long as it is defined by
>> the build process. I've also elected to use %Z instead of %z as I feel
>> that the timezone name is more friendly but that's just a personal
>> preference so I wouldn't object to switching to the numeric
>> representation if others feel strongly.
>
> Concept is fine, I'd actually prefer %z so that the size increase is
> constant at least.  Please do that in a non-RFC v2 and I'll pick it up,
> thanks!

v2 has been sent. After I sent it out of curiosity, I looked up the
POSIX definition of date[1] and it looks as though '%z' is not part of
the spec ('%Z' is). However '%z' is part of the POSIX definition of
strfttime[2]. In practice I'm not sure how much it matters. I know the
GNU date command supports it and it looks like the freebsd one also
does.

I'm not sure which other environments people are using to build
u-boot, hopefully any other environments pass the format string to
strftime(). Just thought I'd bring it up in case someone reports an
issue down the line.

Thanks,
Chris
--
[1] - http://pubs.opengroup.org/onlinepubs/9699919799/utilities/date.html
[2] - http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html

      reply	other threads:[~2015-05-10  9:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30  0:38 [U-Boot] [RFC PATCH v1 0/1] Include timezone information in build Chris Packham
2015-04-30  0:38 ` [U-Boot] [RFC PATCH v1] Makefile: Add U_BOOT_TZ and include in version Chris Packham
2015-05-06  5:38   ` Chris Packham
2015-05-06 15:01     ` Simon Glass
2015-05-10  9:02   ` [U-Boot] [PATCH v2] " Chris Packham
2015-05-28 13:23     ` [U-Boot] [U-Boot, " Tom Rini
2015-05-08 21:05 ` [U-Boot] [RFC PATCH v1 0/1] Include timezone information in build Tom Rini
2015-05-10  9:28   ` Chris Packham [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='CAFOYHZCRWVBRPWrL7Qfa_fPrJer=1+nzYPZnmqRCYeVFRmwxgQ@mail.gmail.com' \
    --to=judge.packham@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.