The problem
The export command calculates day boundaries using time.Now().Truncate(24 * time.Hour), which truncates relative to the Unix epoch (UTC midnight). Depending on the user's timezone, an export run late at night might include entries from the previous day and exclude entries from the current day. This contradicts the log command, which correctly builds local midnight using time.Date(..., time.Local).
Release version
0.8.6
Operating system
macOS
Steps to reproduce the behavior
- Create a time entry late in the day.
- Run
tmpo export --today.
- Depending on your offset from UTC, the entry may be excluded from the export.
Screenshots
No response
Additional context
Both export and log should ideally use settings.GetDisplayTimezone() rather than time.Local, as users who configure a custom timezone in tmpo config currently get timestamps displayed in that timezone, but day boundaries filtered by their machine's local time.
The problem
The
exportcommand calculates day boundaries usingtime.Now().Truncate(24 * time.Hour), which truncates relative to the Unix epoch (UTC midnight). Depending on the user's timezone, an export run late at night might include entries from the previous day and exclude entries from the current day. This contradicts thelogcommand, which correctly builds local midnight usingtime.Date(..., time.Local).Release version
0.8.6
Operating system
macOS
Steps to reproduce the behavior
tmpo export --today.Screenshots
No response
Additional context
Both
exportandlogshould ideally usesettings.GetDisplayTimezone()rather thantime.Local, as users who configure a custom timezone intmpo configcurrently get timestamps displayed in that timezone, but day boundaries filtered by their machine's local time.