Tar: use UtcDateTime when setting last write time. (#88462)
authorTom Deseyn <tom.deseyn@gmail.com>
Thu, 6 Jul 2023 19:41:39 +0000 (21:41 +0200)
committerGitHub <noreply@github.com>
Thu, 6 Jul 2023 19:41:39 +0000 (21:41 +0200)
commit0518ab11ebc23a5ee4e609b3788690a6e9cd9b30
tree18b486b56ca86a0969765b36fd0b56c40d0a2c85
parenta2c19cd005a1130ba7f921e0264287cfbfa8513c
Tar: use UtcDateTime when setting last write time. (#88462)

Using LocalDateTime converts the UTC time from the archive to a local
time, which is then converted back to UTC for the file system.

This removes the local time round-trip.
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.cs
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHelpers.cs