Skip to content
New issue

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

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

Already on GitHub? # to your account

KnpTimeBundle does not show the time correctly with the time zone (when it is not UTC). #219

Open
Rikijs opened this issue Jan 6, 2025 · 0 comments

Comments

@Rikijs
Copy link

Rikijs commented Jan 6, 2025

New feature request or a bug in current behaviour!

I found that KnpTimeBundle does not show the time correctly with the time zone and AGO filter.
Without time zone and with UTF time zone it shows correctly.

Example with time zones (right time):
<div>{{ item.updatedAt | date('Y-m-d H:i:s', new DateTimeZone('Europe/London')) }}</div>

Example with UTC and AGO filter (right time):
<div>{{ item.updatedAt | date('Y-m-d H:i:s', new DateTimeZone('UTC')) | ago }}</div>

Error with TimeZone and AGO filter (wrong time):
<div>{{ item.updatedAt | date('Y-m-d H:i:s', new DateTimeZone('Europe/Germany')) | ago }}</div>

Please add functionality to KnpTimeBundle, that allows for right time in cases when DateTimeZone is not UTC.
Thanks

@Rikijs Rikijs changed the title I found that KnpTimeBundle does not show the time correctly with the time zone. KnpTimeBundle does not show the time correctly with the time zone (when it is not UTC). Jan 10, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant