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
?