示例
In Luxon 3, specifying system as the zone always resolves to the host system zone and ignores Settings.defaultZone.
sha256:8d2b9cea97100faf30a7e95f31f32596bffe04c0d763bba5e9456ea2cd4918ab
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- In Luxon 3, specifying system as the zone always resolves to the host system zone and ignores Settings.defaultZone. HOW
- 包
- luxon 3.5.0
- 环境
- node
- 创建时间
- 2026-08-17T01:57:28Z
常见的想当然
Setting Settings.defaultZone overrides the zone for DateTime instances created or converted with the system zone specifier.
这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。
契约
- DateTime setZone('system') returns a SystemZone instance with type system rather than inheriting Settings.defaultZone.
- DateTime setZone('default') must be explicitly used to inherit the custom Settings.defaultZone.
文件
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9