Show More
@@ -21,13 +21,16 b' class timestamp(tuple):' | |||
|
21 | 21 | A Unix timestamp with optional nanoseconds precision, |
|
22 | 22 | modulo 2**31 seconds. |
|
23 | 23 | |
|
24 |
A |
|
|
24 | A 3-tuple containing: | |
|
25 | 25 | |
|
26 | 26 | `truncated_seconds`: seconds since the Unix epoch, |
|
27 | 27 | truncated to its lower 31 bits |
|
28 | 28 | |
|
29 | 29 | `subsecond_nanoseconds`: number of nanoseconds since `truncated_seconds`. |
|
30 | 30 | When this is zero, the sub-second precision is considered unknown. |
|
31 | ||
|
32 | `second_ambiguous`: whether this timestamp is still "reliable" | |
|
33 | (see `reliable_mtime_of`) if we drop its sub-second component. | |
|
31 | 34 | """ |
|
32 | 35 | |
|
33 | 36 | def __new__(cls, value): |
@@ -93,7 +96,8 b' def mtime_of(stat_result):' | |||
|
93 | 96 | |
|
94 | 97 | |
|
95 | 98 | def reliable_mtime_of(stat_result, present_mtime): |
|
96 |
""" |
|
|
99 | """Same as `mtime_of`, but return `None` or a `Timestamp` with | |
|
100 | `second_ambiguous` set if the date might be ambiguous. | |
|
97 | 101 | |
|
98 | 102 | A modification time is reliable if it is older than "present_time" (or |
|
99 | 103 | sufficiently in the future). |
General Comments 0
You need to be logged in to leave comments.
Login now