Skip to content
SiteEmail

cohtml.Net.ITimeZoneProvider

Inherits from SystemIDisposable

Name
virtual voidDispose()
virtual voidGetLocalTimezoneName(double timeMsUtc, System.IntPtr buffer, ulong maxBufferSize)
Returns the short name of the local timezone for a specific point in time. (e.g. EST, PDT)
virtual doubleGetDaylightSavingsOffset(double timeMsUtc)
Returns the daylight savings time offset (in milliseconds) for a specific point in time.
virtual doubleGetLocalTimeOffset(double timeMs, bool isTimeUtc)
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.
Name
boolswigCMemOwn
virtual void Dispose()
virtual void GetLocalTimezoneName(
double timeMsUtc,
System.IntPtr buffer,
ulong maxBufferSize
)

Returns 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
virtual double GetDaylightSavingsOffset(
double timeMsUtc
)

Returns 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

virtual double GetLocalTimeOffset(
double timeMs,
bool isTimeUtc
)

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.

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

bool swigCMemOwn;