Skip to content

Commit

Permalink
Explicitly disclaim support for time with time zone
Browse files Browse the repository at this point in the history
  • Loading branch information
jackc committed Jul 23, 2024
1 parent ea9610f commit a68e14f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pgtype/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ type TimeValuer interface {

// Time represents the PostgreSQL time type. The PostgreSQL time is a time of day without time zone.
//
// Time is represented as the number of microseconds since midnight in the same way that PostgreSQL does. Other time
// and date types in pgtype can use time.Time as the underlying representation. However, pgtype.Time type cannot due
// to needing to handle 24:00:00. time.Time converts that to 00:00:00 on the following day.
// Time is represented as the number of microseconds since midnight in the same way that PostgreSQL does. Other time and
// date types in pgtype can use time.Time as the underlying representation. However, pgtype.Time type cannot due to
// needing to handle 24:00:00. time.Time converts that to 00:00:00 on the following day.
//
// The time with time zone type is not supported. Use of time with time zone is discouraged by the PostgreSQL documentation.
type Time struct {
Microseconds int64 // Number of microseconds since midnight
Valid bool
Expand Down

0 comments on commit a68e14f

Please sign in to comment.