Hey community,
I have an issue with the following liquid code where I’m basically trying to calculate a future date for a countdown timer in one of my campaigns.
{% assign tomorrow = "now" | date: "%s" | plus: 86400 | date: "%Y-%m-%d 23:59:59" %}
{% countdown point:15 time:"{{ tomorrow }} (GMT)" fg:07182b bg:f9f9fb font:"Helvetica Neue" weight:normal resolution:S frames:60 %}
This gives me the error
countdown: time attribute must be in the form 2006-01-02 15:04:05 (MST), line:13, col:1
However, this code works well;
{% countdown point:15 time:"2026-01-25 23:59:59 (GMT)" fg:07182b bg:f9f9fb font:"Helvetica Neue" weight:normal resolution:S frames:60 %}
I have very limited liquid experience but from best guessing I think either the variable “tomorrow” has the wrong variable type (datetime vs string?) or that I’m adding it to the countdown function the wrong way.
Any help would be much appreciated. Have tried to get this working for ages now!
Many thanks in advance!