[swift-corelibs-dev] TimeZone database
Simon Evans
si at si.org
Thu Jul 6 09:20:36 CDT 2017
Ian
I also saw this error, I think its because the TZDIR is different in the headers shipped with Xcode 9. Maybe the location of the timezone directory was moved between Sierra and High Sierra. What version of macOS are you testing on?
If it has indeed moved between 10.12 and 10.13 it may require a runtime version check to dynamically return TZDIR.
Simon
> On 6 Jul 2017, at 15:09, Ian Partridge via swift-corelibs-dev <swift-corelibs-dev at swift.org> wrote:
>
> Hi,
>
> I'm seeing quite a lot of tests failing when running the
> TestFoundation target in Xcode. The failures are timezone related.
> Most simply, the code
>
> let timeZone = TimeZone(abbreviation: "GMT")
>
> is returning nil.
>
> Walking through the CF code which sets things up, it seems to be
> trying to read the timezone database from
> /var/db/timezone/zoneinfo/zone.tab which doesn't exist on my macOS
> system.
>
> /usr/share/zoneinfo/zone.tab is there and seems to be the right
> location (?), but CF is picking up TZDIR from tzfile.h which says:
>
> #define TZDIR "/var/db/timezone/zoneinfo"
>
> Any thoughts? I feel like I'm missing something obvious and have gone
> too far down the rabbit hole.
>
> --
> Ian Partridge
> _______________________________________________
> swift-corelibs-dev mailing list
> swift-corelibs-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
More information about the swift-corelibs-dev
mailing list