Utc: parse ISO 8601 / RFC 3339, and format with fractions of a second
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 52/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Rust
- Sterne
- 122
- Forks
- 47
- Ø Merge
- 11 Std. 6 Min.
- Gemergte PRs (30 T.)
- 21
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus roc-lang/basic-cli
-
Unix socket supportOffen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
roc-lang/basic-cli#500 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
roc-lang/basic-cli#482 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 45/100
roc-lang/basic-cli#455 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 32/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in roc-lang/basic-cli
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
pedrovgs/UseCaseCoverage#23 ·
-
priority: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
storytold/photocraft#8687 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
THREAD: operation failedOffenarea:kernel bug kernel-paused needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
bherbruck/solvecraft#5055 · 2 Kommentare ·
-
bug cli p3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 3 Tagen
-
documentation good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag