Re: timetz need more bytes than timestamptz

2023-06-18 Thread Junwang Zhao
timetz stores only the time units within a day, it uses an extra field to store the zone info. typedef int64 TimeADT; typedef struct { TimeADT time; /* all time units other than months and years */ int32 zone; /* numeric time zone, in seconds */ } TimeTzADT; timestamp is a count that star

timetz need more bytes than timestamptz

2023-06-18 Thread jian he
Hi, https://www.postgresql.org/docs/current/datatype-datetime.html timetz, timestamptz: same resolution. fractional digits in the seconds field are also the same. > > All timezone-aware dates and times are stored internally in UTC. They are converted to local time in the zone specified by the TimeZ