Luxon: `fromSQL` does not parse input when time zone is `UTC`

Created on 10 Dec 2018  路  2Comments  路  Source: moment/luxon

This works:

DateTime.fromSQL('2018-12-10 16:00:00 America/Denver', { setZone: true })

But when the time zone is UTC it results in an unparsable date:

DateTime.fromSQL('2018-12-10 16:00:00 UTC', { setZone: true })
{
  reason: "unparsable",
  explanation: "the input \"2018-12-10 16:00:00 UTC\" can't be parsed as SQL"
}
bug

All 2 comments

fixed in 9e97c08, will go into the next release

This was released in 1.8.3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

icambron picture icambron  路  5Comments

icambron picture icambron  路  5Comments

UnsungHero97 picture UnsungHero97  路  5Comments

peterjanes picture peterjanes  路  5Comments

dnalborczyk picture dnalborczyk  路  3Comments