Skip to content

Conversation

@SpencerLommel
Copy link

This PR addresses #300

Code organization Changes

  • I created a new core object file called TimePreferences.kt that handles functionality for time zones and adds builds on the existing format method to allow for both TemporalAccessors and Dates.
  • Removed the time zone preference sections from WrapperLogPanel.kt in favor of the new TimePreferences.kt.
  • idb metrics windows also use this new time preference.

UI Changes

  • Under preferences the Timezone setting now exists under General instead of Log Viewer because this Timezone setting should affect all time strings in Kindling.
  • idb viewer time strings now change based on Timezone setting.

Other comments

  • I was thinking about putting the time zone logic in Kindling.kt with some of the other preferences but that file is already 300 lines long so I thought it might be useful to separate it a bit.
  • Also an important thing to note for the format method that accepts Date in TimePreferences.kt, this uses the start of the day which I noted in the javadoc. The reason why is Date objects aren't guaranteed to have H:M:S included so I thought it would be a very bad assumption to just hope they do when formatting. For more information on how we use this check out MetricsView & MetricsCard

@paul-griffith
Copy link
Member

paul-griffith commented Oct 13, 2025

I like this in concept - I think a global default is the right move and while I haven't reviewed in full yet this looks like a solid solution.

I wonder if it's worth going down the rabbit hole of allowing per-tool-panel customization of this default. Maybe in the default tab context menu, opening a popup to allow time zone customization for that particular tool window. Not to say it has to happen in this PR/at all - just spitballing out loud. I imagine that's less important for many end users of Kindling, but will probably be relevant for i.e. folks in IA's support team.

I think the API would end up similar - basically some kind of "give me the contextual timezone for this tool panel, or else the default" wrapper that gives you a utility object with tz formatting methods.

@SpencerLommel
Copy link
Author

per-tool-panel customization of this default

With settings per panel do you mean, different instances of kindling, different tabs at the top of kindling, or the JetBrains like idea where you can pull a panel out and it becomes a new window?

I would agree that down the line we could make the settings a bit more modular and expose them as API's. Also if Kindling Modules (like the Ignition ones) were ever a thing in the future then users could easily hook into this API.

@paul-griffith
Copy link
Member

Different tabs at the top of Kindling - so that if you have one instance open looking at customer X, Y, and Z you can still set them to different timezones to understand them locally.

Though in practice I don't know if it's really something people need/want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants