-
Notifications
You must be signed in to change notification settings - Fork 8
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
ts field in localtime or set timezone #352
Comments
@nnmmaaoo: Unfortunately there's not a simple way to achieve this with the tooling as it stands currently, though we recognize it's a reasonable thing to want to do and have been discussing the best way to go about addressing it. I've got a couple questions just to clarify which short/long-term approaches would address your use case:
|
Initial problem that i was trying to fix is this: zui displays 2 different dates after analyzing a pcap file, if the timezone setting in zui is not UTC. One is forced UTC in the results pane and one in the details pane (the one that appears on the right) is translated into the zui tz.
Yes. For now i have achieved this with a .map to transform the data inside zui. In apps/zui/src/views/results-pane/context.tsx i added the following to the function useContextValue
Its dirty, since it digs insde zed.Value ts type, but it works. Also it utilizes zui timezone setting. But i dont think that this is a great idea, since this code is gonna be executed on every single load of the results table. But if there is no good way to make brimcap aware of a timezone - this will do. Ideally i wanted to add either a flag or a respected env to the functionality of brimcap analyze to convert ts before its piped to zed by zui. And for zui to view already "fixed" data. |
@nnmmaaoo: Thanks for providing those clarifications. I've had to take some time to reassess the improvements we might make at the different layers here, so now I can better summarize. Indeed, the inconsistent handling of Zui's Timezone setting has been a known problem for some time and the history is tracked in brimdata/zui#1057, including what you observed where the results panel didn't reflect the timezone while the Detail panel did. As the comments there describe, over time this problem has actually gotten worse, as in the last GA Zui release v1.17.0, the same code that renders the results panel is now used in the Detail panel as well, so at this point the Timezone setting has embarrassingly lost all meaning. I suppose you've maybe not noticed yet because the modified code you showed was probably put in place on an older Zui code version. The only reason we've not gotten to fixing this problem sooner is because there's been other priorities, but since multiple users including yourself have bumped into this over the years, it definitely feels like it's time we fix this in Zui, so I'll be working with our Dev team to address it ASAP. The fact you were able to come up with a workaround (even if it's maybe "dirty") indicates it shouldn't be too difficult. Since at first I wasn't sure if your problem was specific to Zui, I did look into what improvements we might make at the Zed layer as well. brimdata/super#5221 goes into some detail on research and proposals, so you're welcomed to look that over and chime in with a comment if you have any reaction. In some ways that overlaps with your closing remark:
Right now the Zed data model is such that In closing, I'd recommend you "subscribe" to brimdata/zui#1057 and brimdata/super#5221 if you're interested in tracking ongoing progress in this area. Since I don't think we're likely to change anything specifically within Brimcap related to this, I'm inclined to close this particular issue, but I'll hold it open for a bit just in case you have responses to what I've just written here. Thanks for your interest in the software! |
Ok, i understand. Then my solution will have to suffice. Thank you for your explanation. |
Thanks @nnmmaaoo. We actually have a new Zui PR brimdata/zui#3139 already in progress with some of this timezone support working, so if that all gets wrapped up and merged, we've love it if you could give it a try in a Zui Insiders release and see if it's a satisfactory alternative to what you coded up yourself. I'll ping you here when it's ready. |
@nnmmaaoo: Just wanted to let you know that we did merge some good improvements to the Time Zone support in Zui. I'm, not sure if you're familiar with Zui Insiders, but it's our "daily build" approach for making beta-style features available early for preview/test before our next GA Zui release. It's built as a separate app and starts its own Zed lake storage at a separate filesystem location and on a separate network port so you can have it running side-by-side with "regular" Zui without any crossover between the two in terms of data storage. If you're game to give it a try, we'd love to hear your feedback. The latest Zui Insiders release 1.17.1-insiders.14 includes the changes. We also have a brief article at https://zui.brimdata.io/docs/features/Time-Display that explains a bit more about how to use it. Hope you're up to give it a spin, and please do let us know how it goes! |
Thank you. Ill try the insider build when i get the chance |
Hey, i am working on figuring out a way to display brimcap analyze results ts field in a different timezone from UTC (atleast in .Local()). I am struggling to find, which part of the codebase is responsible for translation of for example: zeeks ts that is supplied in unixtime/zeek floa time format. Could you, please, point me in the right direction? Or should i be looking inside zed library?
The text was updated successfully, but these errors were encountered: