cohtml::ITimeZoneProvider
#include <ITimeZoneProvider.h>
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| ITimeZoneProvider() | |
| virtual | ~ITimeZoneProvider() |
| virtual void | GetLocalTimezoneName(double timeMsUtc, char * buffer, size_t maxBufferSize) =0 Returns the short name of the local timezone for a specific point in time. (e.g. EST, PDT) |
| virtual double | GetDaylightSavingsOffset(double timeMsUtc) =0 Returns the daylight savings time offset (in milliseconds) for a specific point in time. |
| virtual double | GetLocalTimeOffset(double timeMs, bool isTimeUtc) =0 Returns the local time offset (without DST) from UTC (in milliseconds) for a specific point in time. Must comply to the following spec https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-local-time-zone-adjustment. |
Public Functions Documentation
Section titled “Public Functions Documentation”function ITimeZoneProvider
Section titled “function ITimeZoneProvider”ITimeZoneProvider()function ~ITimeZoneProvider
Section titled “function ~ITimeZoneProvider”virtual ~ITimeZoneProvider()function GetLocalTimezoneName
Section titled “function GetLocalTimezoneName”virtual void GetLocalTimezoneName( double timeMsUtc, char * buffer, size_t maxBufferSize) =0Returns the short name of the local timezone for a specific point in time. (e.g. EST, PDT)
Parameters:
- timeMsUtc UTC time point in milliseconds
- buffer a zero terminated buffer to fill the result
- maxBufferSize the max size of the buffer
function GetDaylightSavingsOffset
Section titled “function GetDaylightSavingsOffset”virtual double GetDaylightSavingsOffset( double timeMsUtc) =0Returns the daylight savings time offset (in milliseconds) for a specific point in time.
Parameters:
- timeMsUtc UTC time point in milliseconds
Return: the daylight savings time offset
function GetLocalTimeOffset
Section titled “function GetLocalTimeOffset”virtual double GetLocalTimeOffset( double timeMs, bool isTimeUtc) =0Returns the local time offset (without DST) from UTC (in milliseconds) for a specific point in time. Must comply to the following spec https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-local-time-zone-adjustment.
Parameters:
- timeMs a time point in milliseconds when isTimeUtc is true the time point is in the UTC time zone when isTimeUtc is false the time point is in the local time zone
- isTimeUtc whether timeMs is in the UTC or local time zone
Return: the offset of the local time zone from UTC at timeMs
© 2026 Coherent Labs. All rights reserved.