fix(storage): normalize timestamps to UTC to prevent validation failures (#1123)
All time.Now() calls in the dolt storage layer now use time.Now().UTC() to ensure consistent timezone handling. Previously, timestamps could be stored with mixed timezone formats (UTC 'Z' vs local '+01:00'), causing bv validation to fail when updated_at appeared earlier than created_at in absolute time. Files modified: - transaction.go: CreateIssue, UpdateIssue, CloseIssue - issues.go: CreateIssue, CreateIssues, UpdateIssue, CloseIssue, markDirty, manageClosedAt - rename.go: UpdateIssueID (2 locations) - events.go: AddIssueComment (2 locations) - dirty.go: SetExportHash - queries.go: Overdue filter, GetStaleIssues Fixes: bd-84gw9 Co-authored-by: LoomDeBWiles <loomenwiles@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -82,7 +82,7 @@ func (s *DoltStore) SetExportHash(ctx context.Context, issueID, contentHash stri
|
||||
INSERT INTO export_hashes (issue_id, content_hash, exported_at)
|
||||
VALUES (?, ?, ?)
|
||||
ON DUPLICATE KEY UPDATE content_hash = VALUES(content_hash), exported_at = VALUES(exported_at)
|
||||
`, issueID, contentHash, time.Now())
|
||||
`, issueID, contentHash, time.Now().UTC())
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to set export hash: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user