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
Email showing incorrect hour(s) #119
Comments
@fd6130 Are you by any chance setting either the |
Hi, i'm using the default one and this is how my
|
@jrushlow I've tried to add This bundle https://github.com/SymfonyCasts/verify-email-bundle also have the same issue to me. The weird thing is, reset-password email display as 9 hour(s) while verify-email display as 12 hour(s). Both lifetime are 3600 by default. This is verify-email-bundle email twig result:
And this is reset-password-bundle email twig result:
|
Forgot to mention this, i didn't use the Form and Session class generate by maker. I have modified the controller to use POST request with json response. |
I'm trying to hunt down the cause of the issue and I'm scratching my head. Behind the scenes, we set So the only way for
Having said that, if neither of the above have been changed - than theoretically something in twig is manipulating
Also as possible, but unlikely solution, clear out all Symfony caching and see if the emails still display the wrong value. As a temporary fix, you can modify the
Hopefully I'll be able to reproduce this locally and push up a fix pretty quick.. |
Could this be a timezone issue? |
I don’t think so as PHP’s DateTime doesn’t become aware of the lifetime (in this context) until it is called within the twig template. And even then |
Not sure. I'm using Asia/Kuala_Lumpur timezone. Lol sorry i just accidentally pressed close issues in mobile chrome.😅 |
Actually guys, what is the result of Is it same as datetime in php code:
? |
@fd6130 Would you be able to modify the email templates as described in symfony/maker-bundle#632 to verify that solution solves your issue? I believe the issue is caused by a timezone being set in Twig or in PHP. While both the I've created a short term fix in the aforementioned PR that should take care of this. When I get some free time, I'll come up with a better solution to convert the token lifetime to a human readable format. Using the |
Interesting. After apply the
And the result is different: It seems the first one is ok while the other one still having issue. |
Same bug here. |
…rd-bundle#119) throttle_limit auch auf 7200 gesetzt
Putting |
There's a PR here - https://github.com/symfony/maker-bundle/pull/632/files - but it was tricky enough, that I was waiting for @jrushlow to verify that it works. But there are enough +1 here to support that. But, it seems like we should use |
Hi, I ran into this error earlier and I don't think The biggest problem here is that you're using twig's Twig The simplest solution I've found that doesn't wrap after 24 hours is Oh, and you might actually want to use the server's timezone on |
There is a code in .html.twig to show the expire hour(s):
This link will expire in {{ tokenLifetime|date('g') }} hour(s)..
The tokenLifetime is 3600 and i expect it show as 1 hour(s) but it display as
in my email.
My
requested_at
andexpires_at
in database areThe text was updated successfully, but these errors were encountered: