feat: tmpo export --utc flag added to and local timezone is now default timestamp format#86
Merged
DylanDevelops merged 3 commits intomainfrom Mar 7, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
mainbranch of tmpo.Description
This pull request adds support for exporting timestamps in UTC as an option for both CSV and JSON export formats. It introduces a new
--utcflag to the export command, updates the export logic to handle the new flag, and ensures that timestamps are formatted correctly based on the user's choice. The changes also include improvements to time formatting utility functions and update related tests.Export functionality enhancements:
--utcflag to the export command (cmd/history/export.go), allowing users to choose whether timestamps in exported files are in UTC or their local timezone. [1] [2]ToCSVandToJsonininternal/export/csv.goandinternal/export/json.go) to accept aninUtcparameter and format timestamps accordingly. Helper functions were added to handle timestamp formatting for both formats. [1] [2] [3] [4] [5] [6] [7]exportUtcflag to the export functions, ensuring the correct timezone is used during export.Time formatting improvements:
toDisplayTimefunction ininternal/settings/global_config.goto be exported asToDisplayTime, and updated all usages accordingly for consistency and clarity. [1] [2] [3] [4] [5]Testing updates:
inUtcparameter, ensuring coverage for both UTC and local timezone exports. [1] [2] [3] [4] [5] [6] [7] [8]