docker-gc
docker-gc copied to clipboard
work around macosx date limitation.
This fixes issue #69 .
What leads to date_parse getting an input of 0001-01-01 00:00:00?
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 https://github.com/spotify/docker-gc/pull/70#issuecomment-159115396.
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