Skip to content

Commit 525dd13

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 e5e926e commit 525dd13

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

wit-0.3.0-draft/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)