jackc / pgtype

MIT License
300 stars 111 forks source link

fix: BC for timestamp #195

Closed jozolam closed 1 year ago

jozolam commented 1 year ago

Postgre is adding the suffix " BC" to timestamps that occurred "Before Christ". I was unable to parse such values and got parsing time parsing time "0001-01-01 00:00:00 BC": extra text: " BC" error. This is caused by the usage of time.Parse which (for the used layout) does not expect " BC" suffix.