Skip to content

Conversation

@DylanDevelops
Copy link
Owner

Replaced usage of time.Local with settings.GetDisplayTimezone() in date parsing and display functions. Also exported GetDisplayTimezone for use outside the settings package, ensuring consistent timezone handling based on user configuration.

Pull Request Checklist

  • I have read and followed the contribution guidelines.
  • My pull request targets the main branch of tmpo.
  • I have tested these changes locally on my machine.

Description

This pull request updates how the application handles time zones by ensuring that all date and time parsing and formatting consistently use the user's configured display timezone instead of the local system timezone. The changes primarily involve switching from the local timezone to a configurable display timezone throughout the codebase.

Timezone handling improvements:

  • Updated the parseDateTime function in cmd/entries/manual.go to use settings.GetDisplayTimezone() instead of time.Local for all date and time parsing, ensuring user-configured timezone is respected.
  • Renamed and exported the getDisplayTimezone function to GetDisplayTimezone in internal/settings/global_config.go to make it accessible outside the package.
  • Updated the toDisplayTime function to use the newly exported GetDisplayTimezone for converting UTC time to the user's display timezone.

Replaced usage of time.Local with settings.GetDisplayTimezone() in date parsing and display functions. Also exported GetDisplayTimezone for use outside the settings package, ensuring consistent timezone handling based on user configuration.
@DylanDevelops DylanDevelops merged commit c185580 into main Jan 28, 2026
6 checks passed
@DylanDevelops DylanDevelops deleted the ravel/fix-manual-timezone-issue branch January 28, 2026 05:58
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