You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/common/src/types/datetime.rs
+2-1
Original file line number
Diff line number
Diff line change
@@ -256,7 +256,7 @@ enum ErrorKind {
256
256
ParseDate,
257
257
#[error("Can't cast string to time (expected format is HH:MM:SS[.D+{{up to 6 digits}}][Z] or HH:MM)")]
258
258
ParseTime,
259
-
#[error("Can't cast string to timestamp (expected format is YYYY-MM-DD HH:MM:SS[.D+{{up to 6 digits}}] or YYYY-MM-DD HH:MM or YYYY-MM-DD or ISO 8601 format)")]
259
+
#[error("Can't cast string to timestamp (expected format is YYYY-MM-DD HH:MM:SS[.D+{{up to 9 digits}}] or YYYY-MM-DD HH:MM or YYYY-MM-DD or ISO 8601 format)")]
260
260
ParseTimestamp,
261
261
}
262
262
@@ -486,6 +486,7 @@ impl Time {
486
486
// it is *microseconds* since 1970-01-01 midnight. 2^62 microseconds covers 146235 years.
487
487
// * When the highest 2 bits are `10` or `01`, we flip the second bit to get values from `0b1100...00` to `0b0011..11` again.
488
488
// It is *seconds* since 1970-01-01 midnight. It is then followed by another 32 bits as nanoseconds within a second.
489
+
// Since timestamp is negative when it is less than 1970-1-1, you need to take both cases into account(`11+00`` or `01+10``).
0 commit comments