PostgreSQL: 9.4
FreeBSD: 11.2

When I set my TimeZone parameter in postgresql.conf to localtime I receive the following error when trying to start PostgreSQL.

service postgresql restart
<2022-06-02 11:18:27.612 EDT> LOG:  invalid value for parameter "TimeZone": "localtime"
<2022-06-02 11:18:27.613 EDT> FATAL:  configuration file "/usr/local/pgsql/data/postgresql.conf" contains errors
pg_ctl: could not start server
Examine the log output.

During my searches I've found this correspondence which seems to indicate that /etc/localtime should be a symlink. Mine isn't so I tried changing it to a symlink and it still didn't work as I get the same error as above.

mv /etc/localtime /etc/localtime.bak
ln -s /usr/share/zoneinfo/America/Yellowknife
shutdown -r now
ls -la /etc/localtime
lrwxr-xr-x  1 root  wheel  35 Jun  2 11:04 /etc/localtime -> /usr/share/zoneinfo/America/Yellowknife

Is it possible to get TimeZone set to localtime working on FreeBSD?

Note that I also found this discussion where it mentions creating a symlink to /etc/localtime in /usr/share/zoneinfo. I tried that as well and it did not work as I still get the same error as above.

Using pg_config --configure I see that it was not configured with --with-system-tzdata. Is this a requirement to using localtime?


1 Answer 1


The way you configured PostgreSQL, it does not use the operating system's time zone database, but its own copy, which is located in pg_config --sharedir. So your symbolic link has no effect.

You'd have to create that symbolic link in PostgreSQL's copy of the timezone database, but the correct solution is different: set timezone to America/Yellowknife.

Do not use unsupported PostgreSQL versions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.