YETUS-555. Docker may give an invalid UNIX date Signed-off-by: Sean Busbey <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/6d017f41 Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/6d017f41 Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/6d017f41 Branch: refs/heads/master Commit: 6d017f41987ed96c47f4c8ad60162fd455b4e50e Parents: e27efaa Author: Allen Wittenauer <[email protected]> Authored: Tue Oct 10 18:08:35 2017 -0700 Committer: Allen Wittenauer <[email protected]> Committed: Sat Oct 21 11:48:30 2017 -0700 ---------------------------------------------------------------------- precommit/core.d/docker.sh | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/6d017f41/precommit/core.d/docker.sh ---------------------------------------------------------------------- diff --git a/precommit/core.d/docker.sh b/precommit/core.d/docker.sh index d8fae29..20a9ade 100755 --- a/precommit/core.d/docker.sh +++ b/precommit/core.d/docker.sh @@ -251,6 +251,10 @@ function dockerdate_to_ctime { declare mytime=$1 + if [[ "${mytime}" = "0001-01-01T00:00:00Z" ]]; then + mytime="1970-01-01T00:00:00" + fi + # believe it or not, date is not even close to standardized... if [[ $(uname -s) == Linux ]]; then
