image: Fix creation date in pongo context

Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
This commit is contained in:
Thomas Hipp 2018-02-26 14:40:03 +01:00
parent 17e68c5281
commit 59d87ef199
No known key found for this signature in database
GPG Key ID: 993408D1137B7D51

View File

@ -63,7 +63,7 @@ func (l *LXDImage) Build(unified bool) error {
ctx := pongo2.Context{
"image": l.definition,
"creation_date": l.creationDate,
"creation_date": l.creationDate.Format("20060201_1504"),
}
if l.definition.Name != "" {
@ -115,7 +115,7 @@ func (l *LXDImage) createMetadata() error {
ctx := pongo2.Context{
"image": l.definition,
"creation_date": l.creationDate,
"creation_date": l.creationDate.Format("20060201_1504"),
}
l.Metadata.Properties["description"], err = renderTemplate(l.definition.Description, ctx)