Skip to main content

HS.Timezone.Server.Util

class HS.Timezone.Server.Util

Method Inventory

Methods

classmethod ApplyAdjustment(utcOffset As %String, adjustment As %String) as %String
Applies an adjustment to a UTC offset, if one needs to be applied. @Argument utcOffset Standard UTC offset @Argement adjustment How much to adjust UTC offset by
classmethod FormatOffset(offset As %String) as %String
classmethod GetTimezoneConfiguration(configurations As %DynamicArray, timestamp As %TimeStamp) as %DynamicObject
Get the active configuration for the timezone in the provided year. If there isn't an active configuration, an empty string will be returned. @Argument configurations All configurations for a time zone @Argument timestamp Timestamp used to select active configuration
classmethod NormalizeTimestamp(timestamp As %TimeStamp) as %TimeStamp
Validates a timestamp input. Throws error if timestamp pattern does not match yyyy-mm-dd hh:mm:ss with fractional seconds optional (".xyz"), offset optional ("+-hh:mm" or "Z"), and the space between date and time can also be either a space or a "T". Will normalize the timestamp to always have a space between date and time, and will strip the offset and fractional seconds. @Argument timestamp Timestamp to be validated
FeedbackOpens in a new tab