From 8fad2b859e5998b188e63463a0cacf678a43cd02 Mon Sep 17 00:00:00 2001 From: TallblokeUK Date: Thu, 27 Aug 2026 09:01:32 +0100 Subject: [PATCH] fix: send snippet modification dates with a UTC offset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Modified column showed recently saved snippets in the future — six hours ahead on a UTC-6 site, and by whatever the offset happens to be elsewhere. `Snippet::update_modified()` writes `gmdate( 'Y-m-d H:i:s' )`, so the stored value is UTC but carries no offset. Both paths that hand snippets to the browser passed it through verbatim: the REST response, whose schema already declares `'format' => 'date-time'`, and the inline `snippetsList` payload on the manage screen. The table then calls `humanTimeDiff( snippet.modified )`, and an offset-less string is read as local time, putting every recent snippet ahead of now. `Snippet::get_modified_iso()` returns the same instant as ISO 8601 with an explicit offset, reusing the existing UTC-aware `get_modified_timestamp()`. Both output paths now send that, which also makes the `