I have followed examples on numerous stack exchange websites and various other tutorial websites on how to do date math. I have tried linux (on containers) I get the exact same error:
$ docker run -it bash date -d '2014-11-19T15:40:30+10d'
date: invalid date '2014-11-19T15:40:30+10d'
bash-5.0# date -d '+10 days'
date: invalid date '+10 days'
bash-5.0# date -d '+10 d'
date: invalid date '+10 d'
bash-5.0# date -d '2014-11-19T15:40:30+10 d'
date: invalid date '2014-11-19T15:40:30+10 d'
bash-5.0# date -d '2014-11-19T15:40:30+10 days'
date: invalid date '2014-11-19T15:40:30+10 days'
bash-5.0# date -d '2014-11-19T15:40:30 +10 days'
date: invalid date '2014-11-19T15:40:30 +10 days'
bash-5.0# date -d '2014-11-19T15:40:30 +10 d'
date: invalid date '2014-11-19T15:40:30 +10 d'
bash version:
$ docker run -it bash bash --version
GNU bash, version 5.0.2(1)-release (x86_64-pc-linux-musl)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://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.
I've tried this post This post and this post and even this random website
They can't all be wrong.
docker run -it bash date -d '2014-11-19T15:40:30+10d'
– Christian Bongiorno Feb 13 '19 at 03:49+10 days
as @steeldriver suggested works for me. What does yourdate --version
say? – undercat Feb 13 '19 at 04:36date -d '2014-11-19T15:40:30 10 days'
works,date -d '10 days'
works,date -d '+10 days'
works, butdate -d '2014-11-19T15:40:30 +10 days' gives me the same thing as
date -d '2014-11-19T15:40:30 9 hours'. I'm not sure why. My date --version is 8.29. – Ed Grimm Feb 13 '19 at 04:45