File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,26 @@ pub use self::utc::Utc;
46
46
/// DST.
47
47
/// * No result when the clock is turned forwards during a transition due to for example DST.
48
48
///
49
+ /// <div class="warning">
50
+ ///
51
+ /// In wasm, when using [`Local`], only the [`LocalResult::Single`] variant is returned.
52
+ /// Specifically:
53
+ ///
54
+ /// * When the clock is turned backwards, where `Ambiguous(earliest, latest)` would be expected,
55
+ /// `Single(earliest)` is returned instead.
56
+ /// * When the clock is turned forwards, where `None` would be expected, `Single(t)` is returned,
57
+ /// with `t` being the requested local time represented as though there is no transition on that
58
+ /// day (i.e. still "summer time")
59
+ ///
60
+ /// This is caused because of limitations in the JavaScript
61
+ /// [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)
62
+ /// API, which always parses a local time as a single, valid time - even for an
63
+ /// input which describes a nonexistent or ambiguous time.
64
+ ///
65
+ /// See further discussion and workarounds in <https://github.com/chronotope/chrono/issues/1701>.
66
+ ///
67
+ /// </div>
68
+ ///
49
69
/// When the clock is turned backwards it creates a _fold_ in local time, during which the local
50
70
/// time is _ambiguous_. When the clock is turned forwards it creates a _gap_ in local time, during
51
71
/// which the local time is _missing_, or does not exist.
You can’t perform that action at this time.
0 commit comments