Skip to main content
added 264 characters in body
Source Link
Evan Carroll
  • 64.7k
  • 49
  • 251
  • 496

It seems like now they look atPostgreSQL 10 still

  1. Looks at the environmental variable TZ first
  2. Proceeds to use the localtime library function.
  3. Looks under the shared directory or the system directory for matching timezone information.

So it seems like the environmental variable TZ first9.1 docs are still accurate as of PostgreSQL 10.

Internally, and then proceed toyou can see the list of timezone information by using use the localtime library functionSELECT * FROM pg_timezone_names(); (here in the source) which calls pg_tzenumerate_start which the reads the shared directory or system directory above.

tm = localtime(&tnow);

It seems like now they look at the environmental variable TZ first, and then proceed to use the localtime library function.

tm = localtime(&tnow);

It seems like PostgreSQL 10 still

  1. Looks at the environmental variable TZ first
  2. Proceeds to use the localtime library function.
  3. Looks under the shared directory or the system directory for matching timezone information.

So it seems like the 9.1 docs are still accurate as of PostgreSQL 10.

Internally, you can see the list of timezone information by using SELECT * FROM pg_timezone_names(); (here in the source) which calls pg_tzenumerate_start which the reads the shared directory or system directory above.

Source Link
Evan Carroll
  • 64.7k
  • 49
  • 251
  • 496

It seems like now they look at the environmental variable TZ first, and then proceed to use the localtime library function.

tm = localtime(&tnow);