I have a database with DateTime field like this 1899-12-30 00:00:00.000.
Trying to read this field with time feature results in panic - attempting to multiply with overflow:
// Here `self` is tiberius::Row
let value = self.try_get::<time::PrimitiveDateTime, _>(name);
Results in:
thread '<unnamed>' panicked at 'attempt to multiply with overflow', /Users/squareduck/.config/rust/cargo/registry/src/index.crates.io-6f17d22bba15001f/tiberius-0.12.2/src/tds/time/time.rs:15:31
I have a database with
DateTime
field like this1899-12-30 00:00:00.000
.Trying to read this field with
time
feature results in panic - attempting to multiply with overflow:Results in:
In SQL Server docs it's said that
DateTime
supports dates from year 1753, and only forDate
type the lower bound is 1900: https://learn.microsoft.com/en-us/sql/t-sql/data-types/datetime-transact-sql?view=sql-server-ver16So to me it looks like the culprit is this starting year value: https://github.com/prisma/tiberius/blob/8f66a699dfa041e7b5f736c7e94f92c945453c9e/src/tds/time/time.rs#L57