Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Conversation

@benson-basis
Copy link

This fixes issue #69 .

@mattnworb
Copy link
Member

What leads to date_parse getting an input of 0001-01-01 00:00:00?

@benson-basis
Copy link
Author

It came out of the docker command as the date on one of my volumes. I
didn't, I confess track it further back.

I didn't, by the way, realize that you could run 'docker' commands from
inside a container.

On Mon, Nov 23, 2015 at 7:44 PM, Matt Brown [email protected]
wrote:

What leads to date_parse getting an input of 0001-01-01 00:00:00?


Reply to this email directly or view it on GitHub
#70 (comment).

@konstruktoid
Copy link
Contributor

date_parse in the example above can happen if a container is in a running state, and if you convert it to epoch it will be negative. I handled it this way; https://github.com/konstruktoid/docker-garby/blob/master/docker-garby.sh#L105-L119

$ date -d "2015-12-01 12:12:00" +%s
1448968320
$ date -d "0001-01-01 00:00:00" +%s
-62135601132

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants