Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Wrong Expected Outcome for ToString of DateTime with No Offset Specified

Aperta
#73 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, typescript
Ambito
testing-qa

Direzione di ricerca

Inizia con CqlStringOperatorsTest.xml alle righe 348-351 ed esegui il caso DateTimeToString2 con i timestamp delle richieste di valutazione basati su UTC descritti nell’issue. Confronta il risultato con la regola dell’offset predefinito della specifica CQL, quindi stabilisci se debbano cambiare l’input del test, l’offset dichiarato dal framework di test o la formulazione della specifica; il lavoro è completato quando il comportamento previsto è esplicito e il test vi corrisponde.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug CQLTest: CQL-test-code

The test CqlStringOperatorsTest.toString tests.DateTimeToString2 specifies the following CQL:

ToString(DateTime(2000, 1, 1, 15, 25, 25, 300))

and expected outcome '2000-01-01T15:25:25.300'.

When I run this through the TypeScript/JavaScript engine, I get the result 2000-01-01T15:25:25.300+00:00 because we run the tests using UTC-based evaluation request timestamps.

In the CQL specification, Constructing Date and Time Values says:

The only component that is ever defaulted is the timezone offset component. If no timezone offset component is supplied, the timezone offset component is defaulted to the timezone offset of the timestamp associated with the evaluation request.

This means that DateTime(2000, 1, 1, 15, 25, 25, 300) does have an offset, even if it was not supplied in the constructor. As such, I think it is reasonable (if not required) for the resulting string representation to also have an offset corresponding to the default offset.

Either the test should be updated so the input has an offset, or the test framework should declare what offset to run under, or the spec needs to be clarified about what's expected in this case.

Lingua principale
Nessun dato sulla lingua
Stelle
7
Fork
8
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cqframework/cql-tests

Tutte le issue di cqframework/cql-tests

Issue simili

Altre issue su Testing & QA

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.