Bug 255511

Summary: Default datetime_fmt ambiguous
Product: Services Reporter: Jethro Nederhof <jethro>
Component: WikiAssignee: Cluster Admin <clusteradm>
Status: Closed FIXED    
Severity: Affects Some People CC: philip, wiki-admin
Priority: --- Keywords: easy
Version: unspecified   
Hardware: Any   
OS: Any   

Description Jethro Nederhof 2021-04-30 09:56:51 UTC
I made a change to the Office Hours page to use the DateTime() macro, as this is smart enough to translate datetimes into a user's preferred timezone and date format, which I think would be an improvement to just specifying times in UTC.

Unfortunately, for users that don't have a preference configured, the default shows the timestamp in UTC but doesn't indicate which timezone the timestamp is in. This is unintentionally ambiguous.

Example:
https://wiki.freebsd.org/action/diff/OfficeHours?action=diff&rev1=87&rev2=88

I propose updating the moin configuration for datetime_fmt (see https://wiki.freebsd.org/HelpOnConfiguration#style) to include the %Z or %z format strings (see https://docs.python.org/2.7/library/datetime.html#strftime-strptime-behavior) so the default behaviour is not ambiguous for users.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-05-03 03:54:57 UTC
As discussed on Discord, we'll go with 8601 and include seconds, as moin's default includes it:

  %Y-%m-%dT%H:%M:%S%z
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-05-03 03:58:31 UTC
wikiconfig.py is managed.

@Cluster, please:

 1) Update wiki:wikiconfig.py, appending:

# Override default time format, showing timezone
datetime_fmt = '%Y-%m-%dT%H:%M:%S%z'

 2) Delete wikiconfig.pyc to apply changes
Comment 3 Philip Paeps freebsd_committer freebsd_triage 2021-06-28 12:44:31 UTC
Committed to admin-svn in r13204.