Use $TZDIR to search for time-zone data. Thus avoid depending on package "tzdata", which often introduces changes with near-immediate effects, so it's important to be able to update it fast. Based on a patch fron NixOS. =================================================================== --- qtbase-opensource-src-5.14.2.orig/src/corelib/time/qtimezoneprivate_tz.cpp +++ qtbase-opensource-src-5.15.2/src/corelib/time/qtimezoneprivate_tz.cpp @@ -70,7 +70,11 @@ // Parse zone.tab table, assume lists all installed zones, if not will need to read directories static QTzTimeZoneHash loadTzTimeZones() { - QString path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); + // Try TZDIR first, in case we're running on GuixSD. + QString path = QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/zone.tab"); + // Fallback to traditional paths in case we are not on GuixSD. + if (!QFile::exists(path)) + path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); if (!QFile::exists(path)) path = QStringLiteral("/usr/lib/zoneinfo/zone.tab"); @@ -645,6 +649,9 @@ if (!tzif.open(QIODevice::ReadOnly)) return; } else { + // Try TZDIR first, in case we're running on GuixSD. + tzif.setFileName(QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/") + QString::fromLocal8Bit(ianaId)); + if (!tzif.open(QIODevice::ReadOnly)) { // Open named tz, try modern path first, if fails try legacy path tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId)); if (!tzif.open(QIODevice::ReadOnly)) { @@ -652,6 +659,7 @@ if (!tzif.open(QIODevice::ReadOnly)) return; } + } } QDataStream ds(&tzif); mitter'>committer
path: root/tests/crate.scm
AgeCommit message (Expand)Author
2021-01-13tests: Fix JSON syntax error in 'crate.scm'....Ludovic Courtès
2020-12-04import: crate: Skip tests when Guile-Semver is missing....Ludovic Courtès
2020-12-02import: crate: Use existing package satisfying semver requirement....Hartmut Goebel
2020-12-02import: crate: Trim version for names after left-most non-zero part....Hartmut Goebel
2020-12-02import: utils: Trim patch version from names....Hartmut Goebel
2020-12-02import: crate: Parameterized importing of dev dependencies....Martin Becze
2020-12-02import: crate: Use guile-semver to resolve module versions....Martin Becze
2020-04-27tests: Remove trailing commas in JSON tests....Ludovic Courtès
2020-01-16import: crate: Export 'string->license'....Ludovic Courtès
2019-12-11import: crate: Better handle license expressions....Brice Waegeneire
2019-12-11import: crate: Add recursive import test....Brian Leung