the problem was for datetime<epoch, the timestamp is negative, but since
it's a float that includes the microseconds, if both are true (< epoch
and microsecond > 0), then the computed (int) timestamp was off by one.
Add dedicated tests for this.
Differential D5868
Fix normalize_timestamp() for datetime < epoch with microsecond>0 douardda on Jun 15 2021, 10:44 AM. Authored by
Details
the problem was for datetime<epoch, the timestamp is negative, but since Add dedicated tests for this.
Diff Detail
Event TimelineComment Actions Build has FAILED Patch application report for D5868 (id=21008)Rebasing onto ae50e43fe0... Current branch diff-target is up to date. Changes applied before testcommit 171246dae112447a97e9ad742ad13546e0667da5 Author: David Douard <david.douard@sdfa3.org> Date: Tue Jun 15 10:39:21 2021 +0200 Fix normalize_timestamp() for datetime < epoch with microsecond>0 the problem was for datetime<epoch, the timestamp is negative, but since it's a float that includes the microseconds, if both are true (< epoch and microsecond > 0), then the computed (int) timestamp was off by one. Add dedicated tests for this. Link to build: https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/347/ Comment Actions Build is green Patch application report for D5868 (id=21011)Rebasing onto ae50e43fe0... Current branch diff-target is up to date. Changes applied before testcommit 428c170496ef53f6602bc35ab0c9b60fea8996e4 Author: David Douard <david.douard@sdfa3.org> Date: Tue Jun 15 10:39:21 2021 +0200 Fix normalize_timestamp() for datetime < epoch with microsecond>0 the problem was for datetime<epoch, the timestamp is negative, but since it's a float that includes the microseconds, if both are true (< epoch and microsecond > 0), then the computed (int) timestamp was off by one. Add dedicated tests for this. See https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/349/ for more details. |