-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[WebProfilerBundle] Display date/time elements in the user local timezone #49012
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
Conversation
What about making those as choice that user could change from profiler configuration? With that each user could choose how they want to show those. |
I'd prefer to not introduce a config option for that. I don't think it's important enough to require a customizable setting. The entire interface is (and will remain) in English ... so maybe it's better to just use English for this too? |
I would not make this configurable. Local time always in English sounds good enough to me. |
I also vote for keeping it in English like other parts of the interface |
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig
Outdated
Show resolved
Hide resolved
}; | ||
})(); | ||
|
||
Sfjs.addEventListener(document, 'DOMContentLoaded', function() { | ||
Sfjs.createTabs(); | ||
Sfjs.createToggles(); | ||
Sfjs.convertDateTimesToUserTimezone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this code really be in the JS code that is also loaded by the toolbar ? If think we should have a separate JS file containing profiler-only JS logic (just like we already separate the CSS).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. In a (near) future PR, I'm going to split this JS code and also modernize it a bit.
I've updated this PR:
|
d44ecdd
to
206c5f0
Compare
Thank you @javiereguiluz. |
On Symfony Slack, @tarlepp suggested to render all
<time>
elements in the user local timezone. I think it's a great idea, so this PR implements it.A question remains: should we display date/times in the user timezone AND locale; or on their timezone BUT always in English, like the rest of the interface?
Some examples:
Main profile datetime
(I'm seeing it in Spanish; each developer will see it on their own language)
Search results datetime
Logger timestamps