feat: add ensureUTC function and apply it to datetime transformations in MSSQL processing
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user