示例
Parsing localized date strings with dayjs timezone plugin requires extending utc first and calling dayjs.tz instead of dayjs().tz to avoid host timezone pollution
sha256:25d71a2e3c364d711aa8301232a66e425396851026004a5e211559065f642c12
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Parsing localized date strings with dayjs timezone plugin requires extending utc first and calling dayjs.tz instead of dayjs().tz to avoid host timezone pollution HOW
- 包
- dayjs 1.11.19
- 环境
- node
- 创建时间
- 2026-08-16T06:20:32Z
契约
- assert dayjs.tz throws TypeError unless dayjs.extend(utc) is registered alongside timezone plugin
- assert dayjs.tz(str, tz) parses directly into the target timezone without host timezone pollution
- assert dayjs(str).tz(tz) silently corrupts parsed timestamps by using the host timezone before converting
- assert dayjs.utc(iso).tz(tz, true) preserves clock digits in the target timezone via keepLocalTime
文件
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9