File tree 1 file changed +28
-0
lines changed
typeql/modules/ROOT/pages/values 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,34 @@ When used with a value of type datetime-tz, arithmetic operations with duration
87
87
2024-03-30T12:00:00 Europe/London + PT24H == 2024-03-31T13:00:00
88
88
----
89
89
90
+ If adding months and days results in an ambiguous datetime in the time zone, the earlier datetime is used.
91
+
92
+ [,typeql]
93
+ ----
94
+ # London DST change occurred on 2024-10-27 02:00:00 BST
95
+ # I.e., on 2024-10-27, the time span between 01:00:00 and 02:00:00 occurs twice
96
+ 2024-10-26T01:30:00 Europe/London + P1D == 2024-10-27T01:30:00 BST
97
+
98
+ # Between these two local datetimes, the earliest is BST
99
+ 2024-10-26T01:30:00 Europe/London + PT24H == 2024-10-27T01:30:00 BST
100
+ 2024-10-26T01:30:00 Europe/London + PT25H == 2024-10-27T01:30:00 GMT
101
+ ----
102
+
103
+ If adding months and days results in a datetime that does not exist in the time zone, i.e. if there is a gap in the time zone, the datetime
104
+ is increased by the length of the gap.
105
+
106
+ [,typeql]
107
+ ----
108
+ # London DST change occurred on 2024-03-31 01:00:00 GMT
109
+ # I.e., there is a gap on 2024-03-31 between 01:00:00 and 02:00:00
110
+ 2024-03-30T01:30:00 Europe/London + P1D == 2024-03-31T02:30:00 BST
111
+
112
+ # This is the same as adding 24 hours
113
+ 2024-03-30T01:30:00 Europe/London + PT24H == 2024-03-31T02:30:00 BST
114
+ ----
115
+
116
+ The nanosecond part of the duration is added directly to the underlying UTC timestamp, and as such requires no special handling.
117
+
90
118
=== Defining a duration valued attribute
91
119
92
120
[,typeql]
You can’t perform that action at this time.
0 commit comments