Skip to product information
ShopifyのLiquidで現在時刻を取得する now | date: は「ページがユーザーに表示されたとき」ではなく「最後にテンプレートから生成されたときの時刻(テーマが更新された時刻)」
Published:2023.07.19

Get the current time in Shopify's Liquid now | date: is not "when the page was displayed to the user" but "the time when it was last generated from the template (the time the theme was updated)"

用途

Shopify's liquid allows you to get the current time using now | date:, but it says that this gets the current time when the page was last generated from the template (the time the theme was updated), not when the page was displayed to the user.

When setting up a timed process in Liquid, even if it appears to work fine in the admin screen, it's a good idea to test it at the actual time to make sure it behaves as expected.

↗ Related Post

すべてのShopify TIPS

View all