]> git.proxmox.com Git - proxmox.git/commit
sys: email: use `epoch_to_rfc2822` from proxmox_time
authorLukas Wagner <l.wagner@proxmox.com>
Mon, 11 Dec 2023 13:29:08 +0000 (14:29 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 8 Jan 2024 11:04:47 +0000 (12:04 +0100)
commitdc72878d375808fd5533d7d6f35eac93706d90e6
tree6c8de36a404616ad4bfd4368a82d5dbf5222ded0
parent1384bd9161335471292b5ce1f6e389b9163b4e3e
sys: email: use `epoch_to_rfc2822` from proxmox_time

`strftime`'s formatting is locale-dependent. If the system locale was
set to e.g. de_DE.UTF-8, the `Date` header became invalid
(e.g Mo instead of Mon for 'Monday'), tripping up some mail clients
(e.g. KMail).

This commit should fix this by using the new `epoch_to_rfc2822`
function from proxmox_time. Under the hood, this function uses
`strftime_l` with a fixed locale (C).

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
proxmox-sys/src/email.rs