-
-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setting timezone for specific template #553
Comments
From what I can tell, the current option is to set the timezone for the whole rendering engine. Unfortunately this won't work for our use-case as different templates need to be able to render dates in different timezones. |
Thank you @amit777 , the docs for Along with that, I think we can support a |
I'm open to anything. We have users who have different time zone setting, so the global option is problematic for us. |
# [9.43.0](v9.42.1...v9.43.0) (2022-11-27) ### Features * support timezone offset argument for date filter, [#553](#553) ([7a71485](7a71485))
I find timezone string like timezoneoffset is defined as https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset
|
Maybe this can be a optional filter that depends on extranal modules? Like a liquidjs extras repo? |
# [10.1.0](v10.0.0...v10.1.0) (2022-11-29) ### Features * timezone name for `opts.timezoneOffset` and `date` argument, fixes [#553](#553) ([89c6c76](89c6c76))
🎉 This issue has been resolved in version 10.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I came across a stackoverflow and find it's possible to support timezone names, now can be used like {{ "2021-01-01T23:00:00Z" | date: "%Y-%m-%dT%H:%M:%S", "America/New_York" }} Now LiquidOptions.timezoneOffset supports timezone name as well. Note: The timezone names support depends on JavaScript Date in your browser or Node.js. It can be tricky for date literals when DST is active. It can be viewed as 2 steps
|
Hi there.. sorry to comment on closed issue. But it looks like the documentation on https://liquidjs.com/filters/date.html should be updated to include the new TimeZone parameter. |
Hi, we have a need to be able to set the timezone for the date filter defined here: https://liquidjs.com/filters/date.html
Is it possible to update the
date
filter to have an optional second parameter of the timezone?eg:
{{ article.published_at | date: "%a, %b %d, %y":"America/Los_Angeles" }}
I didn't quite understand the note in the documentation about how to set the timezon in liquid options.
The text was updated successfully, but these errors were encountered: