Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Utc: parse ISO 8601 / RFC 3339, and format with fractions of a second

Geschlossen
#533 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

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
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
rust
Bereich
backend

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

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus roc-lang/basic-cli

Alle Issues in roc-lang/basic-cli

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.