Bug #2279
closedzoneinfo.tgz has old timezone names and data
0%
Description
/usr/share/zoneinfo/zone.tab contains the current timezone names (and other data) and is distributed as part of FreeBSD. Recent releases (e.g. the FreeBSD in pfSense 2.0.* and FreeBSD 8.3 in pfSense 2.1-DEV) have newer names such as "Asia/Kathmandu" and "Asia/Kolkata" (the old names were "Asia/Katmandu" and "Asia/Calcutta").
/usr/share/zoneinfo.tgz is in the pfSense repo. It still has the old timezone names. It needs to be updated to match the current FreeBSD timezone data.
zoneinfo.tgz can be built from /usr/share/zoneinfo/* with code like:
echo "Factory" > /usr/share/zoneinfo.exclude
echo "posixrules" >> /usr/share/zoneinfo.exclude
echo "zone.tab" >> /usr/share/zoneinfo.exclude
cd /usr/share/zoneinfo/
tar -c -v -f - -X /usr/share/zoneinfo.exclude * | gzip -cv > /usr/share/zoneinfo.tgz
cd /usr/share
However, there are only a small number of files in /usr/share/zoneinfo/* in the pfSense distribution (certainly on my nanobsd system). So I don't see how I can create a full zoneinfo.tgz on my pfSense nanobsd system. zoneinfo.tgz needs to be built from a full copy of the zoneinfo data - presumably this could be done from a full vanilla install of FreeBSD 8.3-RC1 on an ordinary computer, which should have a full set of files in /usr/share/zoneinfo/* .
All the relevant timezones need to be in zoneinfo.tgz because:
/usr/local/www/system.php
/usr/local/www/wizard.php
use it to generate the drop-down list of valid timezones.
/etc/inc/system.inc system_timezone_configure
uses it to implement the timezone, including putting the correct timezone data in /etc/localtime
Packages that use local time-based rules need to have good data about the local time (e.g. SquidGuard).
Files
Updated by Phillip Davis over 13 years ago
Also see the forum topic http://forum.pfsense.org/index.php/topic,47093.0.html
Updated by Phillip Davis over 13 years ago
- File zoneinfo.tgz zoneinfo.tgz added
I discovered a previous bug report at https://redmine.pfsense.org/issues/2030
This had an up-to-date zoneinfo.tgz file, but the file also contained the following extra, unneeded/unwanted things:
- Factory
- posixrules
- zone.tab
- SystemV (an empty folder)
I have put it on my pfSense system, unpacked it, removed the unwanted things and tar'd it up again. A command sequence like this did the job:
cd /tmp
mkdir /tmp/zzz
tar -xz -f zoneinfo.tgz -C /tmp/zzz
mv zoneinfo.tgz zoneinfo-old.tgz
cd /tmp/zzz
rm Factory
rm posixrules
rm zone.tab
rmdir SystemV
tar -c -v -f - * | gzip -cv > /tmp/zoneinfo.tgz
cd /tmp
cp zoneinfo.tgz /usr/share
I have tested it on my pfSense 2.1-DEVELOPMENT (7 March, FreeBSD 8.3-RC1, 2G nanobsd). The drop-down list of timezones looks up-to-date, including "Asia/Kathmandu" and "Asia/Kolkata". I have switched to a few different timezones without problem.
The resulting zoneinfo.tgz is attached. I think that all that is needed is to commit this to the repo. It should also be fine for use on pfSense 2.0.n, so it could be considered for 2.0.2?
Updated by Jim Pingle about 13 years ago
- Status changed from New to Resolved
We updated zoneinfo in the main builds (not packages) a few months back, should be OK now.