Bug 242998 - x11-clocks/xclock: Digital strftime %G now gives year as 2020. It should be still 2019
Summary: x11-clocks/xclock: Digital strftime %G now gives year as 2020. It should be s...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 mailing list
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2019-12-31 00:35 UTC by Richard KHOO
Modified: 2020-01-08 01:05 UTC (History)
4 users (show)

See Also:
koobs: maintainer-feedback?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard KHOO 2019-12-31 00:35:12 UTC
Saw this yesterday 30th December.
Comment 1 Tijl Coosemans freebsd_committer 2019-12-31 11:19:17 UTC
Reading the strftime manpage I'd say this is normal.  It says: "This year is the one that contains the greater part of the week."  If you want 2019 you should use %Y.
Comment 2 Tatsuki Makino 2019-12-31 23:07:03 UTC
If I remember correctly, only %V can be combined with %G.
Comment 3 Niclas Zeising freebsd_committer 2020-01-07 09:06:48 UTC
This looks like a misconfiguration rather than a bug in either xclock or strftime?
Comment 4 Tatsuki Makino 2020-01-08 01:05:47 UTC
(In reply to Niclas Zeising from comment #3)

I think it's just a matter of usage.
It should be used as follows:
xclock -d -update 86400 -strftime '%G-%V-%u'

Reading man 3 strftime makes it difficult to understand the relationship like the result of the following command:
for d in $(jot 10 0) ; do date -v 2019y -v 12m -v 28d -v +${d}d '+%a %Y-%m-%d %G-%V-%u %Y-%U-%w %Y-%W-%u' ; done