You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by aw...@apache.org on 2017/10/21 18:48:38 UTC

[2/2] yetus git commit: YETUS-555. Docker may give an invalid UNIX date

YETUS-555. Docker may give an invalid UNIX date

Signed-off-by: Sean Busbey <bu...@apache.org>


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 <aw...@apache.org>
Authored: Tue Oct 10 18:08:35 2017 -0700
Committer: Allen Wittenauer <aw...@apache.org>
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