Skip to content

Commit 3921fca

Browse files
committed
Remove "in-daylight-saving-time" flag
This flag is problematic because when a time zone is "in DST" is not well defined. Most time zones in the world don't use DST at all. Of the ones that do, most go to DST during the summer for half the year, but not all. For example, the function in Moment.js that provides this functionality comes with a giant caveat: https://momentjs.com/docs/#/query/is-daylight-saving-time/
1 parent 13f62d1 commit 3921fca

File tree

2 files changed

+6
-25
lines changed

2 files changed

+6
-25
lines changed

imports.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ also known as <a href="https://en.wikipedia.org/wiki/Unix_time">Unix Time</a>.</
168168
#### <a name="timezone_display"></a>`record timezone-display`
169169
<p>Information useful for displaying a specific <a href="#instant"><code>instant</code></a> in the currently
170170
configured time zone.</p>
171-
<p>This information may vary within a single <code>timezone</code> to reflect daylight
172-
saving time adjustments.</p>
173171
<h5>Record Fields</h5>
174172
<ul>
175173
<li>
@@ -191,22 +189,15 @@ should be the string <code>UTC</code>.</p>
191189
<p>In time zones that do not have an applicable name, a formatted
192190
representation of the UTC offset may be returned, such as <code>-04:00</code>.</p>
193191
</li>
194-
<li>
195-
<p><a name="timezone_display.in_daylight_saving_time"></a><code>in-daylight-saving-time</code>: <code>bool</code></p>
196-
<p>Whether daylight saving time is active.
197-
<p>In implementations that do not expose an actual time zone, this
198-
should return false.</p>
199-
</li>
200192
</ul>
201193
<hr />
202194
<h3>Functions</h3>
203195
<h4><a name="display"></a><code>display: func</code></h4>
204196
<p>Return information needed to display the given <a href="#instant"><code>instant</code></a> in the
205-
currently configured time zone. This includes the UTC offset, the time
206-
zone name, and a flag indicating whether daylight saving time is active.</p>
197+
currently configured time zone. This includes the UTC offset and the
198+
time zone name.</p>
207199
<p>If the currently configured timezone cannot be determined, return a
208-
<a href="#timezone_display"><code>timezone-display</code></a> for <code>UTC</code> with a <a href="#utc_offset"><code>utc-offset</code></a> of 0 and no daylight
209-
saving time.</p>
200+
<a href="#timezone_display"><code>timezone-display</code></a> for <code>UTC</code> with a <a href="#utc_offset"><code>utc-offset</code></a> of 0.</p>
210201
<h5>Params</h5>
211202
<ul>
212203
<li><a name="display.when"></a><code>when</code>: <a href="#instant"><a href="#instant"><code>instant</code></a></a></li>

wit/timezone.wit

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ interface timezone {
66
use system-clock.{instant};
77

88
/// Return information needed to display the given `instant` in the
9-
/// currently configured time zone. This includes the UTC offset, the time
10-
/// zone name, and a flag indicating whether daylight saving time is active.
9+
/// currently configured time zone. This includes the UTC offset and the
10+
/// time zone name.
1111
///
1212
/// If the currently configured timezone cannot be determined, return a
13-
/// `timezone-display` for `UTC` with a `utc-offset` of 0 and no daylight
14-
/// saving time.
13+
/// `timezone-display` for `UTC` with a `utc-offset` of 0.
1514
@unstable(feature = clocks-timezone)
1615
display: func(when: instant) -> timezone-display;
1716

@@ -21,9 +20,6 @@ interface timezone {
2120

2221
/// Information useful for displaying a specific `instant` in the currently
2322
/// configured time zone.
24-
///
25-
/// This information may vary within a single `timezone` to reflect daylight
26-
/// saving time adjustments.
2723
@unstable(feature = clocks-timezone)
2824
record timezone-display {
2925
/// The number of seconds difference between UTC time and the local
@@ -46,11 +42,5 @@ interface timezone {
4642
/// In time zones that do not have an applicable name, a formatted
4743
/// representation of the UTC offset may be returned, such as `-04:00`.
4844
name: string,
49-
50-
/// Whether daylight saving time is active.
51-
///
52-
/// In implementations that do not expose an actual time zone, this
53-
/// should return false.
54-
in-daylight-saving-time: bool,
5545
}
5646
}

0 commit comments

Comments
 (0)