ErlyORM / boss_db

BossDB: a sharded, caching, pooling, evented ORM for Erlang
Other
277 stars 138 forks source link

Wrong rounding of datetime #275

Open SebCav opened 5 years ago

SebCav commented 5 years ago

Hi, in src/db_adapters/boss_db_adapter_pgsql.erl at line 456 and in src/boss_record_lib.erl at line 155 I see that a datetime like {{D1, D2, D3}, {T1, T2, T3} with T3 float is rounded with {{D1, D2, D3}, {T1, T2, round(T3)}} to get an Erlang-standard datetime. Isn't this wrong when T3 > 59.5 ? Isn't it going to round to 60 seconds?