You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The “now” keyword, when passed to the date filter in Shopify Liquid calls out to Ruby's Time.now, which returns the current time, in the current system time zone:
liquid-rust’s implementation uses the current time in UTC, which makes templates relying on the upstream Liquid behaviour behave incorrectly!
For instance, my site uses {{ 'now' | date: "%b %-d, %I:%M %P %Z" }} to print the compilation time in the footer of pages, and it is my intent that this shows in the local time zone of the machine that generated it, however, this now emits the date in UTC, which is less desirable to me.
It’s definitely not a great stance, and I think the suggested workaround is to adjust the time zone of the application (i.e. you could do this by setting TZ, or as Jekyll does, by adjusting it at the build config level), but given that Liquid makes no attempt to allow you to select a time zone for display otherwise, it’d be good to keep it consistent :)
The “now” keyword, when passed to the
date
filter in Shopify Liquid calls out to Ruby'sTime.now
, which returns the current time, in the current system time zone:liquid-rust’s implementation uses the current time in UTC, which makes templates relying on the upstream Liquid behaviour behave incorrectly!
For instance, my site uses
{{ 'now' | date: "%b %-d, %I:%M %P %Z" }}
to print the compilation time in the footer of pages, and it is my intent that this shows in the local time zone of the machine that generated it, however, this now emits the date in UTC, which is less desirable to me.liquid-rust version: master
rust version: 1.32.0
OS: macOS 10.14
The text was updated successfully, but these errors were encountered: