The current installed version of FreeBSD 8.4-RELEASE-p16, 9.3-RELEASE-p2 and 10.0-RELEASE-p9 incorrectly convert UTC to/from local time. Differences between actual zoneinfo IANA and FreeBSD versions [name wrong source file from the directory contrib/tzdata (share/zoneinfo); country; one of the cities for which an error has been observed; the near future for which the observed error]: FreeBSD 8.4-RELEASE-p16: europe Russia Europe/Moscow (26 Oct 2014) africa Egypt Africa/Cairo (24 Apr 2015) Libya Africa/Tripoli (31 Oct 2014) asia Palestine Asia/Hebron (27 Mar 2015) Zion Asia/Jerusalem (6 Oct 2014) FreeBSD 10.0-RELEASE-p9: europe Russia Europe/Moscow (26 Oct 2014) africa Egypt Africa/Cairo (24 Apr 2015) FreeBSD 9.3-RELEASE-p2: europe Russia Europe/Moscow (26 Oct 2014) Workarounds: 1. Temporarily use the current version of /usr/ports/misc/zoneinfo (see attachment zoneinfo-2014.f.txz): # portsnap fetch # portsnap update # cd /usr/ports/misc/zoneinfo # make install Add WITHOUT_ZONEINFO="yes" to your /etc/src.conf; Run tzsetup(8) again to install the right file to /etc/localtime. 2. Copy directory /usr/share/zoneinfo from FreeBSD stable/8, stable/9 or 10.1-RC1. Updated source files, see: https://svnweb.freebsd.org/base/stable/8/share/zoneinfo/antarctica?revision=270814&view=markup https://svnweb.freebsd.org/base/stable/9/contrib/tzdata/etcetera?revision=270815&view=markup https://svnweb.freebsd.org/base/stable/10/contrib/tzdata/backward?revision=270817&view=markup
P.S. Require changes only zone info data files (one, two, or three files). C code or command files changes do not require. -- Sorry for my best English.
Created attachment 148016 [details] Package with zoneinfo data files
Also, this problem may cause application errors. For example: [XXX@YYY ~]# freebsd-upgrade fetch ... [XXX@YYY ~]# freebsd-upgrade install ... [XXX@YYY ~]# pkg upgrade ... [XXX@YYY ~]# date +'%d.%m.%Y %H:%M:%S %Z' 27.10.2014 12:30:00 MSK [XXX@YYY ~]# TZ=Europe/Moscow date +'%d.%m.%Y %H:%M:%S %Z' 27.10.2014 12:30:06 MSK [XXX@YYY ~]# php -r ' date_default_timezone_set("Europe/Moscow"); echo date("r e\n");' Mon, 27 Oct 2014 11:30:21 +0300 Europe/Moscow [XXX@YYY ~]# ruby -e "require 'tzinfo' ; puts TZInfo::Timezone.get('Europe/Moscow').strftime('%d.%m.%Y %H:%M:%S %Z')" 27.10.2014 11:30:33 MSK libc localtime may differ from localtime ruby, php and others with unpredictable consequences
I think outdated timezone information is a critical condition affecting many installations in various ways, so the updated timezone files should make it into the security branch, be available via freebsd-update etc. as a critical update.
And yes, we have a precedent set by https://www.freebsd.org/security/advisories/FreeBSD-EN-07:04.zoneinfo.asc
re@ will issue an errata for this.
Patch committed to all supported release errata branches. Errata notice will be out really soon.
Thank you. Possible Errata should be mentioned that some FreeBSD ported application does not use the system zoneinfo, so additionally you may need to update packages. As far as I know: php, ruby, java, perl (DateTime module), such updates available for `pkg update'. -- Sorry for my best English
Congratulations. <https://www.freebsd.org/security/advisories/FreeBSD-EN-14:10.tzdata.asc> was published. However, IMHO, there is one inaccuracy in section "V. Solution", pp. 1 and 2 look right, if I remember correctly, and update the system and `make install world' implicitly run `tzsetup -r' in the process of their work, but `freebsd-update install' not start `tzsetup -r'. Therefore, p.3 need to add: # freebsd-update fetch # freebsd-update install # tzsetup -r For install zone info updates to /etc/localtime