-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
300 additions
and
19 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package wasi:clocks@0.2.1; | ||
|
||
interface timezone { | ||
use wall-clock.{datetime}; | ||
|
||
/// Return information needed to display the given `datetime`. This includes | ||
/// the UTC offset, the time zone name, and a flag indicating whether | ||
/// daylight saving time is active. | ||
/// | ||
/// If the timezone cannot be determined for the given `datetime`, return a | ||
/// `timezone-display` for `UTC` with a `utc-offset` of 0 and no daylight | ||
/// saving time. | ||
display: func(when: datetime) -> timezone-display; | ||
|
||
/// The same as `display`, but only return the UTC offset. | ||
utc-offset: func(when: datetime) -> s32; | ||
|
||
/// Information useful for displaying the timezone of a specific `datetime`. | ||
/// | ||
/// This information may vary within a single `timezone` to reflect daylight | ||
/// saving time adjustments. | ||
record timezone-display { | ||
/// The number of seconds difference between UTC time and the local | ||
/// time of the timezone. | ||
/// | ||
/// The returned value will always be less than 86400 which is the | ||
/// number of seconds in a day (24*60*60). | ||
/// | ||
/// In implementations that do not expose an actual time zone, this | ||
/// should return 0. | ||
utc-offset: s32, | ||
|
||
/// The abbreviated name of the timezone to display to a user. The name | ||
/// `UTC` indicates Coordinated Universal Time. Otherwise, this should | ||
/// reference local standards for the name of the time zone. | ||
/// | ||
/// In implementations that do not expose an actual time zone, this | ||
/// should be the string `UTC`. | ||
/// | ||
/// In time zones that do not have an applicable name, a formatted | ||
/// representation of the UTC offset may be returned, such as `-04:00`. | ||
name: string, | ||
|
||
/// Whether daylight saving time is active. | ||
/// | ||
/// In implementations that do not expose an actual time zone, this | ||
/// should return false. | ||
in-daylight-saving-time: bool, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package wasi:clocks@0.2.0; | ||
package wasi:clocks@0.2.1; | ||
|
||
world imports { | ||
import monotonic-clock; | ||
import wall-clock; | ||
import timezone; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ package wasi:[email protected]; | |
/// [WASI filesystem path resolution]: https://github.com/WebAssembly/wasi-filesystem/blob/main/path-resolution.md | ||
interface types { | ||
use wasi:io/streams@0.2.0.{input-stream, output-stream, error}; | ||
use wasi:clocks/wall-clock@0.2.0.{datetime}; | ||
use wasi:clocks/wall-clock@0.2.1.{datetime}; | ||
|
||
/// File size or length of a region within a file. | ||
type filesize = u64; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ package wasi:[email protected]; | |
/// outgoing HTTP requests. | ||
world proxy { | ||
/// HTTP proxies have access to time and randomness. | ||
include wasi:clocks/imports@0.2.0; | ||
include wasi:clocks/imports@0.2.1; | ||
import wasi:random/random@0.2.0; | ||
|
||
/// Proxies have standard output and error streams which are expected to | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.