Skip to content

Commit 25a6243

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 f276f9e commit 25a6243

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

imports.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,22 +190,14 @@ should be the string <code>UTC</code>.</p>
190190
<p>In time zones that do not have an applicable name, a formatted
191191
representation of the UTC offset may be returned, such as <code>-04:00</code>.</p>
192192
</li>
193-
<li>
194-
<p><a name="timezone_display.in_daylight_saving_time"></a><code>in-daylight-saving-time</code>: <code>bool</code></p>
195-
<p>Whether daylight saving time is active.
196-
<p>In implementations that do not expose an actual time zone, this
197-
should return false.</p>
198-
</li>
199193
</ul>
200194
<hr />
201195
<h3>Functions</h3>
202196
<h4><a name="display"></a><code>display: func</code></h4>
203197
<p>Return information needed to display the given <a href="#instant"><code>instant</code></a>. This includes
204-
the UTC offset, the time zone name, and a flag indicating whether
205-
daylight saving time is active.</p>
198+
the UTC offset and the time zone name.</p>
206199
<p>If the timezone cannot be determined for the given <a href="#instant"><code>instant</code></a>, return a
207-
<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
208-
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>
209201
<h5>Params</h5>
210202
<ul>
211203
<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: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ interface timezone {
66
use system-clock.{instant};
77

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

@@ -45,11 +43,5 @@ interface timezone {
4543
/// In time zones that do not have an applicable name, a formatted
4644
/// representation of the UTC offset may be returned, such as `-04:00`.
4745
name: string,
48-
49-
/// Whether daylight saving time is active.
50-
///
51-
/// In implementations that do not expose an actual time zone, this
52-
/// should return false.
53-
in-daylight-saving-time: bool,
5446
}
5547
}

0 commit comments

Comments
 (0)