Utc: parse ISO 8601 / RFC 3339, and format with fractions of a second
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reading the Utc implementation and InternalDateTime calendar arithmetic; the issue names no source files or tests. Determine how parsing and formatting fit the existing API, then check how RFC 3339 offsets, optional fractions, and year 1 are represented. Done means round-trip parsing and nanosecond formatting cover the examples and offset cases, or the Utc documentation clearly states the limitation.
由索引模型根据 Issue 内容生成。
描述
Utc.to_iso_8601 formats an instant, but nothing parses one back, and the format drops fractions of a second.
What we needed while porting a Go service to 0.26.0-rc3: it keeps a ledger file of the droplets it created, written by Go with time.Time (RFC 3339 with nanoseconds, "2026-10-17T09:01:23.456789123Z", and "0001-01-01T00:00:00Z" for none). Reading it back in Roc means writing an RFC 3339 parser by hand. Times in JSON from other tools are the same: GitHub's published_at, systemd's timestamps, cloud APIs.
A sketch:
Utc.from_iso_8601 : Str -> Try(Utc, [InvalidTime(Str)]) # RFC 3339: Z or an offset, optional fraction
Utc.to_iso_8601_nanos : Utc -> Str # "2026-10-17T09:01:23.456789123Z"
The calendar arithmetic is already there (InternalDateTime), and Utc's signed range covers year 1. If it is out of scope for basic-cli, a line in Utc's docs saying so would also help.
Seen on 0.26.0-rc3.
- 主要语言
- Rust
- 星标
- 122
- 派生
- 47
- 平均合并
- 10 小时 59 分钟
- 30 天内合并 PR
- 21
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
roc-lang/basic-cli 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
roc-lang/basic-cli#482 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 45/100
roc-lang/basic-cli#455 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 32/100
维护者通常 1 天内回复
-
bug
难度 5/5 一周以上 新手友好度 45/100
维护者通常 1 天内回复
查看 roc-lang/basic-cli 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
IngvarConsulting/unica#2006 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
limitlessprojects/Go-Hybrid#1377 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
Docker host resolution missing default rootless Docker path可能已有人在做 @500B 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
testcontainers/testcontainers-rs#1000 ·
维护者通常 3 天内回复
-
documentation
难度 1/5 1 小时以内 新手友好度 85/100
andyintheshell/perseid#73 ·
维护者通常 1 天内回复