Fix Unspecified DateTime kind for PostgreSQL timestamptz columns
DateOnly.ToDateTime() produces Kind=Unspecified which Npgsql rejects for timestamptz. Specify UTC kind on Plaid transaction dates and add a safety net in BankSyncService for all parsed dates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -442,7 +442,7 @@ public class BankSyncService : IBankSyncService
|
||||
{
|
||||
Id = Guid.NewGuid(),
|
||||
AccountId = linkedAccount.AccountId!.Value,
|
||||
Date = parsed.Date,
|
||||
Date = DateTime.SpecifyKind(parsed.Date, DateTimeKind.Utc),
|
||||
Amount = parsed.Amount,
|
||||
PayeeId = matchedPayee?.Id,
|
||||
PayeeName = parsed.PayeeName,
|
||||
|
||||
Reference in New Issue
Block a user