-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Modify the date selector to use the session timezone #15783
Conversation
I need to alter submitCustomRange() in html/js/librenms.js to also be timezone aware. |
This version works for me |
…ssed a moment date object, then altered the submit javascript function to use the existing moment object instead of creating its own
I'll test this. I started that yesterday, but hit problems with patching - those problems are not for @eskyuu to resolve. |
I finally got the patch to build here (not the fault of your patch) - by "Modify the date selector to use the session timezone" - should I be seeing local time (based on my laptop) or the Timezone specified in |
Hi Dan,You should see the same timezone in both. Before this patch the date selector would always be browser local time.I have noticed that new sessions can sometimes revert to the server time. I need to have a look at why the JavaScript isn't detecting this and updating. Can you please go into the user settings and change your timezone to anything else, then back to UTC and see if that fixes the timezone for your session.RegardsSteveOn 2 Feb 2024 22:08, Dan Langille ***@***.***> wrote:
I finally got the patch to build here (not the fault of your patch) - by "Modify the date selector to use the session timezone" - should I be seeing local time (based on my laptop) or the Timezone specified in /preferences (which I have set to UTC)? I ask because I'm seeing local time in the date picker and on the graph legends.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#15783 (comment)",
"url": "#15783 (comment)",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
Success! This is great, thank you. After changing to local time and back to UTC and reloading the page with the graphs, I have UTC in the date picker and on the graph legends. NOTE: When I select a date range via the date picker and click on
|
Thanks @eskyuu, looks and works great. Would you mind just fixing the style issues (I know you didn't change that part of the code) then we can merge |
No worries - the style should be fixed now. |
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.
LGTM. Thanks!
This pull request has been mentioned on LibreNMS Community. There might be relevant details there: |
Change the date selector to use the timezone defined in the session.
DO NOT DELETE THE UNDERLYING TEXT
Please note
Testers
If you would like to test this pull request then please run:
./scripts/github-apply <pr_id>
, i.e./scripts/github-apply 5926
After you are done testing, you can remove the changes with
./scripts/github-remove
. If there are schema changes, you can ask on discord how to revert.