[pbs-devel] [PATCH proxmox 4/5] time: posix: add epoch_to_rfc2822

Lukas Wagner l.wagner at proxmox.com
Mon Dec 11 14:06:21 CET 2023


On 12/5/23 13:11, Lukas Wagner wrote:
> diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs
> +
> +#[test]
> +fn test_epoch_to_rfc2822() {
> +    let epoch = 1609263000;
> +    let formatted = epoch_to_rfc2822(epoch).unwrap();
> +    assert_eq!(formatted, "Tue, 29 Dec 2020 18:30:00 +0100");
> +}

Just realized this testcase breaks in different time zones - will send a v2.

-- 
- Lukas




More information about the pbs-devel mailing list