Skip to content

Conversation

@DylanDevelops
Copy link
Owner

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.

Closes #31

Description

This pull request improves the accuracy of change detection in the entry editing command by ensuring time comparisons only consider minute-level precision. This prevents false positives when comparing timestamps that may have different second or sub-second values but are otherwise equivalent at the minute level.

Key changes:

Time comparison precision:

  • Updated the comparison logic in the EditCmd command to truncate both the original and edited start and end times to the nearest minute before checking for changes, ensuring only meaningful differences are detected.

Dependency update:

  • Added the time package import in cmd/entries/edit.go to support time truncation operations.

Updated the edit command to compare StartTime and EndTime fields with minute-level precision by truncating to the nearest minute. This prevents false positives when only sub-minute differences exist, aligning with the precision of parseDateTime.
@DylanDevelops DylanDevelops merged commit d0863fe into main Dec 23, 2025
6 checks passed
@DylanDevelops DylanDevelops deleted the ravel/edit-inconsistencies branch December 23, 2025 06:15
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.

Detected edits when no edits were made

2 participants