Page MenuHomeFreeBSD

Install and use /usr/share/zoneinfo/zone1970.tab
ClosedPublic

Authored by tmunro on Jun 15 2019, 1:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 12:37 AM
Unknown Object (File)
Wed, Apr 10, 11:13 PM
Unknown Object (File)
Fri, Apr 5, 10:01 AM
Unknown Object (File)
Sun, Mar 24, 3:58 PM
Unknown Object (File)
Mar 6 2024, 4:28 PM
Unknown Object (File)
Mar 6 2024, 4:28 PM
Unknown Object (File)
Mar 6 2024, 4:28 PM
Unknown Object (File)
Mar 6 2024, 4:23 PM

Details

Summary

Currently we install just zone.tab, but it says:

# This file is intended as a backward-compatibility aid for older programs.
# New programs should use zone1970.tab.  This file is like zone1970.tab (see
# zone1970.tab's comments), but with the following additional restrictions:
#
# 1.  This file contains only ASCII characters.
# 2.  The first data column contains exactly one country code.
#
# Because of (2), each row stands for an area that is the intersection
# of a region identified by a country code and of a timezone where civil
# clocks have agreed since 1970; this is a narrower definition than
# that of zone1970.tab.

Considering messages like [1] I suppose we should install zone1970.tab too for other software that wants to use it, and then we might as well use it for tzsetup(8) too.

[1] http://mm.icann.org/pipermail/tz/2014-October/021760.html

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

tmunro retitled this revision from Install /usr/share/zoneinfo/zone1970.tab to Install and use /usr/share/zoneinfo/zone1970.tab.
tmunro edited the summary of this revision. (Show Details)

I suppose we could update tzsetup(8) to use the new version too, if we're going to install it. So here's a patch that teaches that to handle the modern format with multi-country first field, and gets rid of the hardcoded "Arctic" menu because it went away in the data (concretely that means that people in https://en.wikipedia.org/wiki/Svalbard would need to choose Europe -> Norway, whose timezone they share as I assume they are well aware, being "a full part of the Kingdom of Norway").

However, I wonder if the encoding situation is OK; the modern version is in UTF8, and for example, if you pick Asia -> Kazhakstan, you'll see some non-ASCII characters. I'm not sure I understand ncursesw's model of character encoding, but I can see that we are already showing UTF8 text directly from /usr/shared/misc/iso3166 ("Côte d'Ivoire", "Curaçao", ...), so maybe that's OK.

However, I wonder if the encoding situation is OK; the modern version is in UTF8, and for example, if you pick Asia -> Kazhakstan, you'll see some non-ASCII characters. I'm not sure I understand ncursesw's model of character encoding, but I can see that we are already showing UTF8 text directly from /usr/shared/misc/iso3166 ("Côte d'Ivoire", "Curaçao", ...), so maybe that's OK.

ncursesw just follows the LC_CTYPE to determine the character encoding (it actually uses the multibyte(3) functions), so it deals fine with UTF8 as long as a UTF8 locale is set (assuming the terminal can also cope).

I think this is an excellent idea and the changes to tzsetup(8) look sensible. Please, go ahead and commit this.

This revision is now accepted and ready to land.Jul 15 2019, 3:57 PM
allanjude added a subscriber: allanjude.

Approved By: allanjude (mentor)

This revision was automatically updated to reflect the committed changes.