consistent timestamp format and timezone #1077
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#1077
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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]source:trunk/src/allmydata/util/time_format.py?annotate=blame&rev=7607268a58f31842f94c415a3403c6740c898679 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.
Created #1078 (timestamps: localizable format and timezone).
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.
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.
Hm, or perhaps we should use underscore (
_
) as the separator character, since that is what we currently use in UI to representlinkcrtime
andlinkmotime
and since that is more suitable for using as a filename such as for incident report files or log files.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.).
I find the format with a "
_
" separator less readable, and don't see any advantage over using a space.RFC 3339 says:
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 using2010-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.Do we really want things like the announced/since fields on the welcome page in UTC? That would be a usability regression IMHO. I think they should be in local time (on the gateway) with RFC 3339 offset indicators (+/-hhmm).
The linkcrtime and linkmotime timestamps on directory pages are incredibly ugly at the moment.
Replying to daira:
Isn't that #1078?
Not really, because the format I want isn't the OS's localized default time format; it's ISO 8601 for everyone -- just a less ugly interpretation of ISO 8601.
Replying to daira:
What format do you want? I'm pretty sure that whatever the answer is, the answer belongs on either #1077 (make timestamps consistent and DRY), or #1078 (make timestamps configurable to the user's preferences).
I think this can be closed now that https://github.com/tahoe-lafs/tahoe-lafs/commit/6226f6b497028889859dfcff56d4dbd7b65b8c2c is merged?
I believe all timestamps in the WUI are now in a consistent format (in the gateway's local time zone).
It's much better now, although I'd still prefer to add RFC 3339 offset indicators.