From ee67c64262f14d0df12414dbbd34ef40495c32f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 18 Nov 2026 22:35:44 +0100 Subject: [PATCH] Keep generated news entry publishing date in sync with filename date --- src/News/Entry.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/News/Entry.php b/src/News/Entry.php index a08052c168..062aeb4c3d 100755 --- a/src/News/Entry.php +++ b/src/News/Entry.php @@ -122,8 +122,8 @@ public function save(): self { self::ce($dom, "title", $this->title, [], $item); self::ce($dom, "id", $archive, [], $item); - self::ce($dom, "published", date(DATE_ATOM), [], $item); - self::ce($dom, "updated", date(DATE_ATOM), [], $item); + self::ce($dom, "published", date(DATE_ATOM, $_SERVER['REQUEST_TIME']), [], $item); + self::ce($dom, "updated", date(DATE_ATOM, $_SERVER['REQUEST_TIME']), [], $item); self::ce($dom, "link", null, ['href' => "{$href}#{$this->id}", "rel" => "alternate", "type" => "text/html"], $item); self::ce($dom, "link", null, ['href' => $link, 'rel' => 'via', 'type' => 'text/html'], $item);