LXC snapshots.pattern including creation date

Hi there,

I am trying to set snapshots pattern to incude date instead of incremental number.
According to documentation I think it is possible to do but I don’t understand how.

From docs:
snapshots.pattern takes a pongo2 template string, and the pongo2 context contains the creation_date variable. Be aware that you should format the date (e.g. use {{ creation_date|date:"2006-01-02_15-04-05" }} ) in your template string to avoid forbidden characters in your snapshot name. Another way to avoid name collisions is to use the placeholder %d

lxc config set c1 snapshots.pattern “snapshot-%d”

Use of %creation_date, or %date instead of %d not working for me.

Thank you!

lxc config set test snapshots.pattern "snapshot-{{ creation_date|date:'2006-01-02_15-04-05' }}"

lxc snapshot test

lxc info test
    Name: test
    Location: none
    Remote: unix://
    Architecture: x86_64
    Created: 2019/12/13 20:26 UTC
    Status: Stopped
    Type: persistent
    Profiles: default
      snapshot-2019-12-13_21-35-57 (taken at 2019/12/13 20:35 UTC) (stateless)

Thank you!