]> git.ipfire.org Git - thirdparty/curl.git/commit
tool_filetime: accept setting negative filetime
authorDaniel Stenberg <daniel@haxx.se>
Sun, 31 Aug 2025 21:21:43 +0000 (23:21 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 1 Sep 2025 06:51:36 +0000 (08:51 +0200)
commit54f1ef05d672453d75a5fc60f7658eaa835ce5cc
treeef3842cdde3c4504fbe1b854cb4623c6f8027fcd
parenta5798a51f038628e80b211c0985b3c5e93737bfa
tool_filetime: accept setting negative filetime

This allows --remote-time to set dates before 1970.

Due to a minor omission in the API, it will still avoid setting the time
if it is indeed exactly epoch 0 (jan 1 1970).

Verified by test 762

Fixes #18424
Reported-by: Terence Eden
Closes #18443
src/tool_filetime.c
tests/data/Makefile.am
tests/data/test762 [new file with mode: 0644]