Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter |localDate does not seem to be taking Bootstrap-set up timezone into account #380

Closed
Marian-Kechlibar opened this issue Oct 1, 2024 · 0 comments

Comments

@Marian-Kechlibar
Copy link

Version: 3.0.18

Let us consider the following date and time:

public string $datetime_released = '2024-10-01 21:37:45 UTC';

If I create a new Nette\Utils\DateTime out of this string:

$time = new Nette\Utils\DateTime($datetime_released)

and run {$time|localDate}, it will show me something like

"dnes 21:37"

IntlDateFormatter, on the other hand, takes the TimeZone set in Bootstrap.php into account:

$configurator->setTimeZone('Europe/Prague');

and will print 23:37, which corresponds to CEST.

It is my opinion that Latte Engine should take the TimeZone set up in the Bootstrap into account when formatting dates and times, too, and the documentation should mention behavior of localDate filter with regard to TimeZone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant