Time Zone Provider
Date.now()from the UTC zone.
The Time Zone Provider interface resides in
ITimeZoneProviderimplementations ignore it and return a result for the current point in time. They also assume that DST is always 1 hour.
To override the default code you have to implement the interface and pass an object to a
View through the
ViewSettings::TimezoneProvider initialization option.
ITimeZoneProviderimplementation object. A
Viewcan use it as long as it is alive.
ITimeZoneProviderto each view or have a single one shared by all of them.
Prysm calls methods of the interface when needed. The methods receive a UTC time point and are expected to return one of the following:
- Time offset from the UTC zone.
- Time offset for daylight savings time if it is in effect.
- The name of the time zone that you are in.
For an example implementation you can check the