depot/third_party/nixpkgs/pkgs/os-specific/bsd/freebsd/sys-gnu-date.patch
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

13 lines
427 B
Diff

diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index c594724d814..d5287c7b992 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -177,7 +177,7 @@ u=${USER:-root}
d=$(pwd)
h=${HOSTNAME:-$(hostname)}
if [ -n "$SOURCE_DATE_EPOCH" ]; then
- if ! t=$(date -r $SOURCE_DATE_EPOCH 2>/dev/null); then
+ if ! t=$(date -d @$SOURCE_DATE_EPOCH 2>/dev/null); then
echo "Invalid SOURCE_DATE_EPOCH" >&2
exit 1
fi