logtimestamps need to use standard ISO8601 format #2092

issue grarpamp opened this issue on December 11, 2012
  1. grarpamp commented at 9:40 PM on December 11, 2012: none

    Timestamps such as '12/11/12' are ambiguous, unsortable, and more. ISO8601 was introduced and internationally ratified to fix this. So you want to say (in extended localtime format) '2012-12-12T21:01:02', or '20121212T210102' in basic format. Refer to pp:4.3.2 on page 19 of the spec for a quick picture.

    There are also places in the code where the data logged contains and embedded timestamp in the line... that also needs to use ISO8601.

    https://en.wikipedia.org/wiki/ISO_8601 http://dotat.at/tmp/ISO_8601-2004_E.pdf

  2. Diapolo commented at 2:09 PM on December 12, 2012: none

    Your valuable input is most likely not important enough to result in patches too soon. I just want to say, if you are able to code, your best bet is to create a pull-request for such things :). As I said, thanks for the ideas anyway.

  3. sipa commented at 2:15 PM on December 12, 2012: member

    I've wondered myself why it uses that strange US format, but ti seems it just uses strftime's %x, which outputs "The preferred date representation for the current locale without the time.". I've probably set my locale to something US-like. I wouldn't mind changing it to a standard format, though.

  4. grarpamp commented at 4:21 PM on December 12, 2012: none

    The US prefers stupid :( No idea which LC_TIME might do ISO8601, doubt anyone would know to set it, and it wouldn't conform anyways because only part of the string (the %x) is covered by LC_TIME, the rest is hardcoded such that it won't be ISO8601. This should be most of them... find -sE . ! -regex '^./.git/.$' -type f | xargs egrep -i 'datetimestrformat|%(y|h|m|x)|gmt|utc'

    ISO8601 basic format: %Y%m%dT%H%M%S Though neither ISO8601 or human, there is one other possible format for use in computing where automated use is expected, the epoch (%s).

  5. gavinandresen commented at 2:43 AM on December 14, 2012: contributor

    Fix merged for 0.8.

  6. gavinandresen closed this on Dec 14, 2012

  7. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 21:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me