Should we support customization of the time zone? #209
sleberknight
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently the
ApplicationErrorfactory methods will all create a new instance withcreatedAtandupdatedAtusing UTC as the time zone. TheRecentErrorsHealthCheckdoes the same thing when creating the reference dates. For all our usage so far, this is fine since all our servers and databases are set to UTC. But there could be situations where this isn't true, and it might be nice to have a way to configure the time zone this library should use when creating newApplicationErrorinstances and in the health check. I didn't look to hard, so there might be other places where we instantiateZonedDateTimeinstances.A possible alternative is to switch all the
ZonedDateTimefields and method arguments to useInstantinstead, but that would have a rather large impact on our dozens of services that already use this library, in that we'd need to make a major version change, and then upgrade all the services (since they won't compile without changes).Beta Was this translation helpful? Give feedback.
All reactions