Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
displayed date/times are incorrect #117
Currently, rundeck-cli return the date in this format : 2017-05-2511:21:00+0200
Using the exact same date and time, iso-8601 date format is very close : 2017-05-25T13:21:00+0200
Most utilities and languages, starting with the "date" command can immediately understand the iso-8601 date without error, but aren't able to do so with the rundeck-cli default format
Useful option. I played with it for a while, and got the wanted format, but it seems there's still a problem, caused by the date package itself : the time is always returned relative to the UTC timezone.
I've search about it, and multiple time it's suggested to not use the default date package, but instead use either the new java.time package in java 8 or Joda-Time.
I've already built a function to deal with this behavior, so no hurry about it, but this switch might be worth considering
when you say "relative to the UTC timezone" what do you mean? do you have some examples? are you expecting it relative to local system timezone?
also, try using
Meaning this : local time is 22h10, GMT+1 (with daylight saving time)
btw, I forgot to link a reference : https://stackoverflow.com/a/21940449
This aside, I ran the test, and the data sent from rundeck to rd-cli is indeed in UTC tz (the following job is scheduled at 06:15 am) :
Casting the date with a forced TZ might correct this, but not sure there wont be a side effect with other TZ
changed the title from
Add iso-8601 date format support
displayed date/times are incorrect
Aug 24, 2017
added a commit
Aug 24, 2017
Sorry, missed the comment as I didn't check back the issue : though it was closed, and usually, furthers comments are ignored ... most of the time.
When I saw the new version between your 2 posts, I updated rd-cli.