HomePhabricator

[tests] Remove ctime() call which may be unreliable on some systems

Description

[tests] Remove ctime() call which may be unreliable on some systems

Summary:
time.ctime() documentation is not clear on the maximum value supported, but we
get a hint from documentation of related functions such as:
https://docs.python.org/3/library/datetime.html#datetime.date.fromtimestamp

On my machine, I see failures somewhere around time.ctime(pow(2, 35)), although it varies
for some people: https://stackoverflow.com/questions/46133223/maximum-value-of-timestamp

Until the 2038 Problem is reliably fixed everywhere, we should not rely on it when logging
timestamps from tests, as these values will tend to prod boundary conditions (ie. very large
and very small timestamps).

Test Plan: ninja check-functional

Reviewers: #bitcoin_abc, Fabien, deadalnix

Reviewed By: #bitcoin_abc, Fabien, deadalnix

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D6023

Details

Provenance
jasonbcoxAuthored on May 10 2020, 21:41
jasonbcoxPushed on May 11 2020, 22:23
Reviewer
Restricted Project
Differential Revision
D6023: [tests] Remove ctime() call which may be unreliable on some systems
Parents
rABC33703bca73f1: [CMAKE] Use jemalloc as an allocator
Branches
Unknown
Tags
Unknown