Fix timezone conversion on strings

by @PrinsFrank

Some issues have been detected in this pull request

0
Coding Standard

0
Common Typos

0
File Permissions

0
Merge Commits

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/twigphp/Twig/4546/097cc7274a106d5230129a5917d0c8cb53617ee2/exception_messages.diff | patch -p0
diff -ru src/Extension/CoreExtension.php src/Extension/CoreExtension.php
--- src/Extension/CoreExtension.php	2025-01-20 15:44:35.512654652 +0000
+++ src/Extension/CoreExtension.php	2025-01-20 15:44:36.494656369 +0000
@@ -2061,7 +2061,7 @@
         }
 
         if ($env->hasExtension(SandboxExtension::class) && $env->getExtension(SandboxExtension::class)->isSandboxed()) {
-            throw new RuntimeError(\sprintf('The callable passed to the "%s" %s must be a Closure in sandbox mode.', $thing, $type));
+            throw new RuntimeError(\sprintf('The callable passed to the "%s" "%s" must be a Closure in sandbox mode.', $thing, $type));
         }
 
         trigger_deprecation('twig/twig', '3.15', 'Passing a callable that is not a PHP \Closure as an argument to the "%s" %s is deprecated.', $thing, $type);

0
Usage of void in test files

0
Use ::class whenever possible

0
Deprecation Messages