HomeSoftware Heritage

Fix normalize_timestamp() for datetime < epoch with microsecond>0

Description

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.

Details

Provenance
douarddaAuthored on Jun 15 2021, 10:39 AM
douarddaPushed on Jun 15 2021, 2:46 PM
Differential Revision
D5868: Fix normalize_timestamp() for datetime < epoch with microsecond>0
Parents
rDMODae50e43fe091: cli: add recursive option
Branches
Unknown
Tags
Unknown
Build Status
Buildable 22021
Build 34251: test-and-buildJenkins console · Jenkins