dateutils
dateutils copied to clipboard
dateconv doesn't convert time between TZs when full date not specified
In the dateconv
manpage it says that -b
is used for underspecified inputs, and that it defaults to the current date and time, which makes it sounds like the following command should assume the current date for the missing data, and just convert the time between the timezones:
dateconv --from-zone America/Chicago --zone Europe/Berlin '12:00' -i '%H:%M' -f '%T'
Which should print 19:00:00
, but in fact just prints out the given time (12:00:00
) instead. Passing a full date does make it work however:
dateconv --from-zone America/Chicago --zone Europe/Berlin '2017-11-20 12:00' -i '%F %H:%M' -f '%T'
Ah good catch. I must say I hate automagic stuff (like the --base|-b
thing). But who am I to contradict popular demand.
See 8e7bd70b for a "fix".
Awesome, thanks. This does make quick time conversions a lot simpler.
Do you have any rough timeframe of when you expect to tag a new release by the way? No hurry though, as I can just use the git build for now.
Hm, I don't I'm afraid. Normally I release on urgent bug fixes or when the IERS publishes information about leap seconds. Assuming no urgent bug fixes that would be March 2018 then.