PhoenixmlDb.Core
ImplicitTimezone
The implicit timezone of the dynamic context (XPath 3.1 §2.1.2): the timezone a date, time or dateTime with none of its own is taken to be in when it is compared with one that has one. It is the timezone of the machine unless the host says otherwise.
#ImplicitTimezone
Namespace: PhoenixmlDb.Xdm
The implicit timezone of the dynamic context (XPath 3.1 §2.1.2): the timezone a date, time or dateTime with none of its own is taken to be in when it is compared with one that has one. It is the timezone of the machine unless the host says otherwise.
The date and time types read it here, so that every comparison in one evaluation uses the same one. Left alone, two servers in different zones give different answers to xs:dateTime('2020-01-01T12:00:00') lt xs:dateTime('2020-01-01T12:00:00+01:00').
A host sets it for the code that runs inside ImplicitTimezone.Use. The value follows the asynchronous flow of that code and no other, so evaluations that run side by side can each have their own.
#Properties
| Name | Description |
|---|---|
Configured
|
What a host set for the running code, or null when it set nothing. |
Current
|
The implicit timezone in effect: what a host set, or the machine's offset now. |
#Methods
#Use(Nullable<TimeSpan>)
Sets the implicit timezone for the code that runs until the result is disposed, which puts back what was there. Null means the machine's timezone.
Exceptions:
-
ArgumentOutOfRangeException— The offset is not a whole number of minutes between -14:00 and +14:00, the range of an XML Schema timezone.