Issue 10060

Title
Ceil milliseconds of datetime
Priority
bug
Status
unread
Nosy list
ced
Assigned to
Keywords

Created on 2021-02-04.00:32:30 by ced, last changed 2 weeks ago by ced.

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-02-04.00:32:30

Momentjs support only milliseconds so the datetime microseconds are trunked. The problem is that when such datetime is used for reading history records like in the account_invoice_history module, the read value does not match the exact value because the clause <= select the record before because of the trunking.
It will be better to ceil so the result will always be a datetime before the right value. This is important when the datetime is exactly the create datetime because then it raises an error as no record is found.
Another solution would be that Sao.DateTime remember the exact millisecond to restitute it later but this will be hard to maintain with operations.

History
Date User Action Args
2021-02-13 10:59:37cedsetassignedto: ced ->
2021-02-04 00:32:30cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)