-
Notifications
You must be signed in to change notification settings - Fork 626
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
feat: UTC timezone #1107
feat: UTC timezone #1107
Conversation
size-limit report 📦
|
Codecov Report
@@ Coverage Diff @@
## main #1107 +/- ##
==========================================
+ Coverage 70.79% 70.80% +0.02%
==========================================
Files 93 94 +1
Lines 3022 3047 +25
Branches 757 761 +4
==========================================
+ Hits 2139 2157 +18
- Misses 879 886 +7
Partials 4 4
Continue to review full report at Codecov.
|
Haven't looked at the code yet but here are my thoughts:
|
This setting is global for all pages of Pyroscope web app. It's important to understand that I updated only the "front-end" of interacting with time. This PR doesn't affect functions which set/calculate time, it's only for fuctions which "render" time (time selectors/ timelines etc.). Pyroscope already stores and works with time in unix format what equals to UTC.
You are right, it's just for POC. Can you describe your vision of this selector?
yes it is, I keep this param in redux state
no, sharing reports logic stays the same. recepient will see this report in timezone which he set on his browser |
cb95b31
to
7833dcc
Compare
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.
I'm slightly confused by why we need to maintain a isUTC
, isn't utc == gmt and therefore, offset 0?
Couldn't some of the code be simplified by simply using an offset? Then if we ever implement support for other timezones it's just a matter of taking different offsets? [0]
[0] Althought I still feel like offsets are not the best abstraction, since offset change in eg daylight savings.
^^^^^^^^^
based on this i think the abstractions should be timezones directly no?
456a2cd
to
522e41e
Compare
@eh-am agree with you. In fact we operate time offset, not UTC/local time, I refactored my solution in a bit in accordance with your ideas.
UPD: not relevant |
Thanks @pavelpashkovsky !! Looks great :) |
Adding possibility to watch profiling data time in local and UTC timezone (#1084)
DEMO: (https://monosnap.com/file/IBcMlw4Pjfpg6rvx483WDv1CuBJLGh)
Pyrosope uses UNIX timestamp for all time operations (UNIX timestamp = UTC time). This POC added posibility to watch time without affecting parts working on calculating time. User will be able to select between browser(local) timezone and UTC which time he want to see on the UI