#1077 assigned defect

consistent timestamp format and timezone — at Version 10

Reported by: zooko Owned by: zooko
Priority: major Milestone: soon
Component: code Version: 1.7β
Keywords: time usability logging Cc:
Launchpad Bug:

Description (last modified by zooko)

All timestamps which are visible in the user interface, log files or other files, automatically generated filenames, etc., should be in the same format and timezone. For the present, that format should be RFC 3339 format, e.g. 2010-06-12 03:54:00.12345. There is code in time_format.py that will generate this format (if you tell it to use a space char as separator instead of the default underscore char as separator).

For the present, the timezone should be UTC. For added unambiguity, append the char Z to the end of the timestamp to indicate UTC.

I'll open separate tickets to make the formatting and timezone localizable without losing the consistency and unambiguity. This ticket is just about achieving consistency and unambiguity.

Change History (10)

comment:1 Changed at 2010-06-12T04:09:15Z by zooko

Created #1078 (timestamps: localizable format and timezone).

comment:2 Changed at 2010-06-12T04:27:15Z by zooko

Updated http://foolscap.lothar.com/trac/ticket/111 (Incident filename timestamps: TZ, UTC, ISO-8601 please) which is about the filenames of the incident-report log files.

comment:3 Changed at 2010-06-12T04:30:14Z by zooko

I was really irritated a few minutes ago when I found different timestamp formatting while investigating #1079 (upload of file into dir doesn't appear on Recent Uploads and Downloads). It isn't really that big of a deal, it's just become one of those pet peeves.

comment:4 Changed at 2010-06-12T04:37:03Z by zooko

Hm, or perhaps we should use underscore (_) as the separator character, since that is what we currently use in UI to represent linkcrtime and linkmotime and since that is more suitable for using as a filename such as for incident report files or log files.

comment:5 Changed at 2010-06-12T17:05:30Z by terrell

I suggest sticking with the default underscore as separator as well, as other tools may be more easily able to parse timestamps from tahoe log files that way. Timestamps in the WUI can be translated via javascript at runtime into something more useful/helpful if desired (i.e. 12 minutes ago, 3 months ago, etc.).

comment:6 Changed at 2010-06-12T23:32:59Z by davidsarah

I find the format with a "_" separator less readable, and don't see any advantage over using a space.

RFC 3339 says:

      NOTE: ISO 8601 defines date and time separated by "T".
      Applications using this syntax may choose, for the sake of
      readability, to specify a full-date and full-time separated by
      (say) a space character.

comment:7 Changed at 2010-06-12T23:33:37Z by davidsarah

  • Keywords time usability logging added

comment:8 Changed at 2010-06-13T15:58:03Z by zooko

One advantage is that if you want to use the timestamp in a filename you won't have trouble with tools that don't handle spaces in filenames. But I'm okay with that—I don't mind letting such tools fail on my filenames and then fixing the tools to handle spaces in filenames. I'm also okay with using 2010-06-12 03:54:00.12345 for all timestamps except filenames and using 2010-06-12_03:54:00.12345 for filenames. The fact that RFC 3339 suggests using a space character is a point in its favor, since consistency is my main goal and this way our timestamps are more likely to look identical to other people's timestamps.

comment:9 Changed at 2012-05-23T18:34:38Z by zooko

  • Owner changed from somebody to zooko
  • Status changed from new to assigned

comment:10 Changed at 2013-05-22T23:42:31Z by zooko

  • Description modified (diff)
Note: See TracTickets for help on using tickets.