mauricio/postgresql-async

Timestamp encoding with BC dates

cornerman opened this issue · 0 comments

When having a LocalDateTime with a negative year, this is encoded as a date string with a negative year (sign in front of the year number). But this throws an SQL-Error ErrorMessage(fields=Map(Line -> 3793, File -> datetime.c, SQLSTATE -> 22009, Routine -> DateTimeParseError, V -> ERROR, Message -> time zone displacement out of range: "-4713-01-01 00:53:28.000000", Severity -> ERROR)).

For postgres, negative years need to be encoded with a BC postfix after date string instead.