CodeSampleX

Exemple

Pass the zone option as the second argument of DateTime.fromObject to avoid throwing an InvalidUnitError.

sha256:31d9b35df507ef47793a06236b9ba0af7bff4a16fb02f92ce28fd040c75341f9

PUBLISHED L3_CONTRACT_PASS MIT-0

Cas

Objectif
Pass the zone option as the second argument of DateTime.fromObject to avoid throwing an InvalidUnitError. HOW
Paquets
luxon 3.7.2
Environnement
node
Créé
2026-08-17T01:57:17Z

Ce que l'on suppose souvent

DateTime.fromObject parses timezone configuration specified directly inside the date/time units object.

L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.

Contrat

Fichiers

Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté

Seeder d'origine

csx-seed

Reçus de vérification