cloudavail / aws-missing-tools

tools for managing AWS resources including EC2, EBS, RDS, IAM, CloudFormation and Route53.
1.34k stars 406 forks source link

The problem with the description of snapshot #113

Open khoi-thinh opened 9 years ago

khoi-thinh commented 9 years ago

I tried a lot of times, but the description doesn't display the right date. For example, today is 2015/11/27 but the description said vol-xxxxx 1448593501. What does 1448593501 mean and can you tell me how to fix it please?

khoi-thinh commented 9 years ago

Any ideas anyone?

paulwakeford commented 9 years ago

It's ctime - http://www.onlineconversion.com/unix_time.htm

On Friday, 27 November 2015, thinhduckhoi notifications@github.com wrote:

I tried a lot of times, but the description doesn't display the right date. For example, today is 2015/11/27 but the description said vol-xxxxx 1448593501. What does 1448593501 mean and can you tell me how to fix it please?

— Reply to this email directly or view it on GitHub https://github.com/colinbjohnson/aws-missing-tools/issues/113.

khoi-thinh commented 9 years ago

Thank you so much. I forgot about that unix time.

davfox commented 8 years ago

I got this to work by changing the middle line below to the last line.

sets date variable

current_date=$(date -u)

current_date=$(date -u +"%d-%m-%Y-%H-%M-%S")

khoi-thinh commented 8 years ago

Thank you so much for a help, It works like a charm! :D

One-Note-Pony commented 8 years ago

For anyone thinking of making the description date output more human-readable, keep in mind that the value for purge_after_fe is still in seconds-from-epoch, and the decision to purge is based on whether purge_after_fe < current_date, with both values being treated by the script as if they were ctime.