[pbs-devel] [PATCH proxmox-backup(-qemu) 0/6] improve timestamp handling
Fabian Grünbichler
f.gruenbichler at proxmox.com
Fri Sep 11 14:34:33 CEST 2020
chrono provides two methods to convert seconds+nanoseconds to a
DateTime:
TimeZone::timestamp(), which panics on invalid input
TimeZone::timestamp_opt(), which returns a Result-type
this series changes most call sites to use the latter, especially when
epoch timestamps are transferred between client and server or are
provided by the user.
depending on context, either raising a nicer error, or using/printing
the original input values is done when encountering a value that chrono
does not handle.
More information about the pbs-devel
mailing list