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
Describe the bug
Root cause is storing dates without timezone, interpreting them as UTC times and rendering as local time.
Affects any country with a negative timezone offset. Are the raw dates exposed to the certificate? If yes, then we could deprecate dateFormatTransformer altogether and add a new formatting helpers in country configuration for dates without and with a timezone.
Id imagine local time of the event is what is shown on birth certificates in most cases at least. longDateTransformer is probably unaffected
There is a discrepancy in dateTime fields that it returns the number of milliseconds elapsed since epoch to the custom handlebars while our eventDate handlebars get the formatted string. Could we address that here as well perhaps?
Tasks
Define a new GraphQL scalar and a graphql-codegen type PlainDate
PlainDate needs to be a type that cannot be directly used as new Date parameter so compiler lets you know
Implement a method for converting PlainDates to regular Dates so the time is converted properly to a Date
new Date(plainDate) -> UTC date -> UTC date -11 hours = wrong date
localToUTC(plainDate) -> UTC date + (your timezone offset * -1) -> UTC date + 11 hours
localToUTC(plainDate) -> UTC date - 11 -> UTC date
Verify values are shown correctly in the UI when your browser is on a -11 time zone
Is this a breaking change and what's the implication?
The text was updated successfully, but these errors were encountered:
Describe the bug
Root cause is storing dates without timezone, interpreting them as UTC times and rendering as local time.
Affects any country with a negative timezone offset. Are the raw dates exposed to the certificate? If yes, then we could deprecate dateFormatTransformer altogether and add a new formatting helpers in country configuration for dates without and with a timezone.
Id imagine local time of the event is what is shown on birth certificates in most cases at least. longDateTransformer is probably unaffected
There is a discrepancy in dateTime fields that it returns the number of milliseconds elapsed since epoch to the custom handlebars while our eventDate handlebars get the formatted string. Could we address that here as well perhaps?
Tasks
Define a new GraphQL scalar and a graphql-codegen type
PlainDate
new Date
parameter so compiler lets you knowImplement a method for converting PlainDates to regular Dates so the time is converted properly to a Date
The text was updated successfully, but these errors were encountered: