pgx icon indicating copy to clipboard operation
pgx copied to clipboard

Add ScanLocation to Timestamp and Timestamptz

Open jackc opened this issue 1 year ago • 0 comments

This setting allows configuring the time.Location of time.Time values scanned from PostgreSQL timestamp and timestamptz.

For timestamptz it changes the display location but the instant in time is unchanged. That is, regardless of the value of ScanLocation, the results of time.Time.Equal() will be the same.

For timestamp it changes the location the time is assumed to have been in. That is, changing the value of ScanLocation will change the results of time.Time.Equal().

jackc avatar Mar 16 '24 18:03 jackc