Hi Alex,
Use "T0" or " 0" zone offset prefix to make it work:
$ date -d2023-09-20T0+0200
2023 Sep 19 Tue 16:00:00
$ date -d2023-09-20\ 0+0200
2023 Sep 19 Tue 16:00:00
or maybe add [ T]12:00 to make it less ambiguous when dealing only with dates?
I agree that date with zone without time has a useful meaning, so allowing the
time to be optional, defaulting to 0 as usual, in strptime(3) and date(1), would
be useful.
On 2025-02-11 08:57, Alejandro Colomar via tz wrote:
Hi Paul,
Ping. Could you please have a look at this? We have some nasty bugs in
shadow, and are yet undecided on how to fix them.
On Thu, Aug 01, 2024 at 01:46:40PM +0200, Alejandro Colomar wrote:
On Thu, Aug 01, 2024 at 01:43:36PM GMT, Alejandro Colomar wrote:
I like this approach the most. Which made me wonder... is date(1)
fancy?
$ date --date='2023-09-20[+0200]'
date: invalid date ‘2023-09-20[+0200]’
Does this kind of date-with-timezone look good to you?
Would you add support for it in GNU date(1) (via gnulib)?
Have a lovely day!
Alex
$ date --version
date (GNU coreutils) 9.4
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.
It seems not. Paul, should I report a bug to coreutils, or do you have
plans for it already? It would be interesting if date(1) would accept
these suffixes.
Now I remember, coreutils uses gnulib for that, as you told me some time
ago. It would be a gnulib report. :)
Didn't you all go around on this last August in bug-gnulib?
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher but when there is no more to cut
-- Antoine de Saint-Exupéry