Bug 477215 - Use UTC offset to indicate time zone.
Summary: Use UTC offset to indicate time zone.
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: git-master
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-19 01:39 UTC by Roke Julian Lockhart Beedell
Modified: 2024-01-15 13:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
4wy78uwh: performance-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roke Julian Lockhart Beedell 2023-11-19 01:39:33 UTC
SUMMARY
Use UTC offset to indicate the time zone (per ISO 8601) rather than non-standard 3-letter codes (they don't even conform to https://www.iana.org/time-zones so they're not particularly useful).

STEPS TO REPRODUCE
1. `%Y%M%DT%H%m%S%t`

OBSERVED RESULT
20231026T030735BST (non-standard)

EXPECTED RESULT
20231026T030735+0100 (per ISO 8601)

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20231117
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11
Kernel Version: 6.6.1-1-default (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
Memory: 30.5 GiB of RAM
Graphics Processor: AMD Radeon RX 5700
Manufacturer: ASRock
Product Name: X670E Taichi

ADDITIONAL INFORMATION
https://discuss.kde.org/t/how-to-use-utc-offset-as-timezone-identifier-instead-of-code-in-spectacle/7420/2?u=rokejulianlockhart
Comment 1 Noah Davis 2023-11-29 08:26:34 UTC
I think it would be good to have both, if possible. After looking at https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations, they definitely are problematic though.
Comment 2 Bug Janitor Service 2023-12-01 19:49:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/302
Comment 3 Noah Davis 2023-12-04 21:14:42 UTC
Git commit 5584097868388123da1e10a1fdca9e57d67a4aa9 by Noah Davis.
Committed on 04/12/2023 at 10:19.
Pushed by ndavis into branch 'master'.

Support all QDateTime string formatting options as filename placeholders

There are a lot of them and showing them all in the UI might be too
much, so they're currently hidden features. I know adding hidden
features is kind of dubious, but I don't think it'll be harmful. We
can't add new translatable strings right now without asking for a string
freeze exception anyway.

See QDate and QTime docs:

- https://doc.qt.io/qt-6/qdate.html#toString
- https://doc.qt.io/qt-6/qtime.html#toString

M  +42   -23   src/ExportManager.cpp
M  +22   -3    src/ExportManager.h
M  +4    -0    src/Gui/SettingsDialog/ImageSaveOptionsPage.cpp
M  +4    -0    src/Gui/SettingsDialog/VideoSaveOptionsPage.cpp
M  +10   -8    tests/FilenameTest.cpp

https://invent.kde.org/graphics/spectacle/-/commit/5584097868388123da1e10a1fdca9e57d67a4aa9
Comment 4 Noah Davis 2023-12-04 21:16:42 UTC
In 24.02, you can use `<tt>` as a placeholder for ±HHmm or `<ttt>` for ±HH:mm
Comment 5 Noah Davis 2024-01-15 13:08:38 UTC
Git commit 0877bd1db42bcf0824847ddd5d3eb7376c74cc23 by Noah Davis.
Committed on 15/01/2024 at 14:04.
Pushed by ndavis into branch 'master'.

Extra date/time placeholder descriptions, 12 hour <h>/<hh>

Now you can see extra date/time placeholders with descriptions in the
configuration dialog with the "Show More" link button.

Moves "AM/PM or am/pm (localized)", "Hour (00–23)" and "Timezone offset
(±0000)" to main list.

Moves "Timezone (abbreviation)" to extras since timezone codes are not
standardized or unique.

`<h>` and `<hh>` are now always 12 hour format so that they can be
meaningfully different from `<H>` and `<HH>`.

Updated filename test for `<h>` and `<hh>`.

M  +34   -29   src/ExportManager.cpp
M  +6    -4    tests/FilenameTest.cpp

https://invent.kde.org/graphics/spectacle/-/commit/0877bd1db42bcf0824847ddd5d3eb7376c74cc23