From 618da03e0edc4cb3010ebf3d4ecc9a5ae5b2be23 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 3 Apr 2025 15:24:56 +0200 Subject: [PATCH] Add timezone to the date of scheduled messages --- composer.json | 3 +- composer.lock | 66 +++++++++++++++++++++++- templates/fediplan/Ajax/layout.html.twig | 2 +- templates/fediplan/scheduled.html.twig | 23 ++++++++- 4 files changed, 90 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 7218a81..4b27bde 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,8 @@ "symfony/validator": "7.0.*", "symfony/web-link": "7.0.*", "symfony/yaml": "7.0.*", - "twig/extra-bundle": "^2.12|^3.0", + "twig/extra-bundle": "^3.20", + "twig/intl-extra": "^3.20", "twig/twig": "v3.15.0" }, "config": { diff --git a/composer.lock b/composer.lock index 193bb10..ac7ce63 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "088c0941ec8a7b29575fdbaf090412d3", + "content-hash": "e0f8b9b4d95600fa7505117747bb8660", "packages": [ { "name": "composer/semver", @@ -5887,6 +5887,70 @@ ], "time": "2025-02-08T09:47:15+00:00" }, + { + "name": "twig/intl-extra", + "version": "v3.20.0", + "source": { + "type": "git", + "url": "https://github.com/twigphp/intl-extra.git", + "reference": "05bc5d46b9df9e62399eae53e7c0b0633298b146" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/intl-extra/zipball/05bc5d46b9df9e62399eae53e7c0b0633298b146", + "reference": "05bc5d46b9df9e62399eae53e7c0b0633298b146", + "shasum": "" + }, + "require": { + "php": ">=8.1.0", + "symfony/intl": "^5.4|^6.4|^7.0", + "twig/twig": "^3.13|^4.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Twig\\Extra\\Intl\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + } + ], + "description": "A Twig extension for Intl", + "homepage": "https://twig.symfony.com", + "keywords": [ + "intl", + "twig" + ], + "support": { + "source": "https://github.com/twigphp/intl-extra/tree/v3.20.0" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2025-01-31T20:45:36+00:00" + }, { "name": "twig/twig", "version": "v3.15.0", diff --git a/templates/fediplan/Ajax/layout.html.twig b/templates/fediplan/Ajax/layout.html.twig index 1381468..08201ec 100644 --- a/templates/fediplan/Ajax/layout.html.twig +++ b/templates/fediplan/Ajax/layout.html.twig @@ -46,7 +46,7 @@ {% elseif status.visibility == "direct" %} {% endif %} - - {{ status.scheduledAt | date('d/m/y H:i') }} + - {{ status.scheduledAt | date('Y-m-d H:m:s') }} + @@ -45,6 +45,22 @@