feat: add ensureUTC function and apply it to datetime transformations in MSSQL processing

This commit is contained in:
2026-04-07 11:37:04 -05:00
parent aea310a3dd
commit 2f8263d332
2 changed files with 14 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import (
"database/sql"
"fmt"
"sync"
"time"
"github.com/jackc/pgx/v5/pgxpool"
@@ -83,6 +84,10 @@ func transformRowsMssql(columns []ColumnType, in <-chan []UnknownRowValues, out
if b, ok := value.([]byte); ok {
rowValues[i] = wkbToEwkbWithSrid(b, 4326)
}
} else if col.SystemType() == "datetime" || col.SystemType() == "datetime2" {
if t, ok := value.(time.Time); ok {
rowValues[i] = ensureUTC(t)
}
}
}
}