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
Is your feature request related to a problem? Please describe.
Vendure saves dates in UTC which should be converted to the customers/users local timezone inside of emails. This is easy enough if you sell to only one region, like for example central europe, but this becomes a bit trickier once expanding or even for singular, larger countries (USA, Canada, ...) with multiple timezones inside the same shipping area.
Describe the solution you'd like
It'd be nice to have an example in the docs that uses the customers address to look up the relevant timezone and then pass that info into the EmailPlugin so that a datetime can be formatted correctly.
Additional context
Theres a maintained timezone database by IANA here which inside of the tzdata*.tar.gz archive features a countries_with_timeZones.json file which has entries that look like this:
Adresses have a Country field which extends Region which have a code column which usually features a two character ISO country code that could be used to look up the timezones.
This would solve the problem for smaller countries with a single timezone, but leaves larger countries hanging. See the "US" entry:
This could also be a larger discussion about introducing a timezone field on the User Entity because this seems to be generally useful IMO. Other shop systems, CRMs, CMSs, etc. often feature a timezone field on users. Thinking out loud here.
Is your feature request related to a problem? Please describe.
Vendure saves dates in UTC which should be converted to the customers/users local timezone inside of emails. This is easy enough if you sell to only one region, like for example central europe, but this becomes a bit trickier once expanding or even for singular, larger countries (USA, Canada, ...) with multiple timezones inside the same shipping area.
Describe the solution you'd like
It'd be nice to have an example in the docs that uses the customers address to look up the relevant timezone and then pass that info into the
EmailPlugin
so that a datetime can be formatted correctly.Additional context
Theres a maintained timezone database by IANA here which inside of the
tzdata*.tar.gz
archive features acountries_with_timeZones.json
file which has entries that look like this:Adresses have a Country field which extends Region which have a
code
column which usually features a two character ISO country code that could be used to look up the timezones.This would solve the problem for smaller countries with a single timezone, but leaves larger countries hanging. See the
"US"
entry:Additional Links
The text was updated successfully, but these errors were encountered: