Skip to content

Improve date/time format for default filename template

Noah Davis requested to merge work/ndavis/default-iso-date-filename into master

The old format was <yyyy><MM><dd>_<hh><mm><ss> where <hh> can be 12 or 24 hour format, depending on the locale.

The new format is <yyyy>-<MM>-<dd>T<HH><mm><ss><tt> where <HH> is always 24 hour format and <tt> is the timezone offset. This allows screenshots to always be accurately sorted by order of the date/time taken when sorted by name. Colons are allowed to be omitted in the time by ISO 8601, but that's not actually that important for us. I chose to omit the colons because NTFS doesn't allow colons in filenames. If filenames had colons in the time by default, the time would be more readable, but also harder to share with Windows PCs in some cases. One of the main reasons to take a screenshot is sharing it with others, so I thought cross-platform compatibility would be more important.

I did not add a kconf_update script to preserve the old filename template for existing users. This is for 2 reasons:

  1. The default filename is now translated, so figuring out how to set it for the user's locale from an update script is difficult.
  2. We already have an older script doing the same thing for release version users, so at least they'll their settings migrated.

The following CC'd report is not officially about this, but the reporter did express a desire for a better date format.

CCBUG: 477583

Edited by Noah Davis

Merge request reports