[web-php] master: Keep generated news entry publishing date in sync with filename date (#2084)

From: Date: Wed, 18 Nov 2026 21:54:52 +0000
Subject: [web-php] master: Keep generated news entry publishing date in sync with filename date (#2084)
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-34219@lists.php.net to get a copy of this message
Author: Tim Düsterhus (TimWolla) Committer: GitHub (web-flow) Pusher: TimWolla Date: 2026-11-18T22:54:49+01:00 Commit: https://github.com/php/web-php/commit/4f24a2123cdc68d45122ab0ff6b5910b86852a3c Raw diff: https://github.com/php/web-php/commit/4f24a2123cdc68d45122ab0ff6b5910b86852a3c.diff Keep generated news entry publishing date in sync with filename date (#2084) Changed paths: M src/News/Entry.php Diff: 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);

« previous php.webmaster (#34219) next »