mirror of https://github.com/hashicorp/packer
Fixes #1092, Adds a format option to the {{isotime}} variable.
Now using the golang magic date: Mon Jan 2 15:04:05 -0700 MST 2006
One can format the time like:
{{isotime "2006-01-02"}} == "YYYY-MM-DD"
{{isotime "060102-15"}} == "YYMMDD-HH" (24-hour clock)
{{isotime "060102-3"}} == "YYMMDD-H" (12-hour clock)
Using {{isotime}} as a standalone variable doesn't change. It still returns RFC3339 formatted time.
pull/1126/head
parent
7b09052845
commit
cd29c8d586
Loading…
Reference in new issue