<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">We have a list of required packages in our README.md - we could add tzdata to that.<div class=""><br class=""></div><div class="">- Tony<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 6, 2017, at 1:48 PM, Youming Lin via swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><p class=""><font size="2" class="">Thanks for pointing me to the package. Turns out it was intentional:<br class=""></font><a href="https://github.com/docker-library/official-images/issues/2863" class=""><font size="2" class="">https://github.com/docker-library/official-images/issues/2863</font></a><font size="2" class=""><br class=""><br class="">A caveat to Swift developers using official Docker Ubuntu images in the future.<br class=""><br class="">Youming Lin<br class="">IBM Cloud, Swift@IBM, Kitura developer<br class="">Austin, TX<br class="">GitHub: @youming-lin</font><br class=""><br class=""><span id="cid:1__=8FBB0BC6DFE262F98f9e8a93df938690918c8FB@"><graycol.gif></span><font size="2" color="#424282" class="">Simon Evans ---07/06/2017 03:20:57 PM---Looks like timezone files are in the ‘tzdata’ package. Maybe it got uninstalled or was never install</font><br class=""><br class=""><font size="2" color="#5F5F5F" class="">From: </font><font size="2" class="">Simon Evans <<a href="mailto:si@si.org" class="">si@si.org</a>></font><br class=""><font size="2" color="#5F5F5F" class="">To: </font><font size="2" class="">Youming Lin <<a href="mailto:ylin@us.ibm.com" class="">ylin@us.ibm.com</a>></font><br class=""><font size="2" color="#5F5F5F" class="">Cc: </font><font size="2" class="">Alex Blewitt <<a href="mailto:alblue@apple.com" class="">alblue@apple.com</a>>, Ian Partridge <<a href="mailto:ian@poncho.org.uk" class="">ian@poncho.org.uk</a>>, swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>></font><br class=""><font size="2" color="#5F5F5F" class="">Date: </font><font size="2" class="">07/06/2017 03:20 PM</font><br class=""><font size="2" color="#5F5F5F" class="">Subject: </font><font size="2" class="">Re: [swift-corelibs-dev] TimeZone database</font><br class=""></p><hr width="100%" size="2" align="left" noshade="" style="color:#8091A5; " class=""><br class=""><br class=""><br class="">Looks like timezone files are in the ‘tzdata’ package. Maybe it got uninstalled or was never installed as part of the base. An ‘apt-get install tzdata’ might fix it.<br class=""><br class="">Simon<br class="">
<ul class=""><ul class="">On 6 Jul 2017, at 20:20, Youming Lin via swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" class=""><u class=""><font color="#0000FF" class="">swift-corelibs-dev@swift.org</font></u></a>> wrote:<br class=""><p class=""><font size="2" class="">That's odd. Maybe my ubuntu:16.04 image is outdated or something, but here are my outputs:<br class=""></font><font face="Monaco" class=""><br class="">ylin@youming-mbpr:~/Swift/Kitura-Markdown$ docker run -it --rm ubuntu:16.04 find /usr -name zone.tab<br class="">ylin@youming-mbpr:~/Swift/Kitura-Markdown$ docker run -it --rm ubuntu:14.04 find /usr -name zone.tab<br class="">/usr/share/zoneinfo/zone.tab</font><font size="2" class=""><br class=""><br class="">The file is found in ubuntu:14.04 but not in ubuntu:16.04.<br class=""><br class="">Here are my images:<br class=""></font><font face="Monaco" class=""><br class="">ylin@youming-mbpr:~/Swift/Kitura-Markdown$ docker images<br class="">REPOSITORY TAG IMAGE ID CREATED SIZE<br class="">ubuntu 16.04 7b9b13f7b9c0 4 weeks ago 118MB<br class="">ubuntu 14.04 132b7427a3b4 4 weeks ago 188MB</font><br class=""><font size="2" class=""><br class="">Thanks,<br class=""><br class="">Youming Lin<br class="">IBM Cloud, Swift@IBM, Kitura developer<br class="">Austin, TX<br class="">GitHub: @youming-lin</font><br class=""><br class=""><graycol.gif><font size="2" color="#424282" class="">Alex Blewitt ---07/06/2017 01:42:22 PM---It looks like it's /usr/share/zoneinfo on all Ubuntu versions: alblue.local[~]$ docker run -it --rm</font><br class=""><font size="2" color="#5F5F5F" class=""><br class="">From: </font><font size="2" class="">Alex Blewitt <</font><a href="mailto:alblue@apple.com" class=""><u class=""><font size="2" color="#0000FF" class="">alblue@apple.com</font></u></a><font size="2" class="">></font><font size="2" color="#5F5F5F" class=""><br class="">To: </font><font size="2" class="">Tony Parker <</font><a href="mailto:anthony.parker@apple.com" class=""><u class=""><font size="2" color="#0000FF" class="">anthony.parker@apple.com</font></u></a><font size="2" class="">></font><font size="2" color="#5F5F5F" class=""><br class="">Cc: </font><font size="2" class="">Youming Lin <</font><a href="mailto:ylin@us.ibm.com" class=""><u class=""><font size="2" color="#0000FF" class="">ylin@us.ibm.com</font></u></a><font size="2" class="">>, Ian Partridge <</font><a href="mailto:ian@poncho.org.uk" class=""><u class=""><font size="2" color="#0000FF" class="">ian@poncho.org.uk</font></u></a><font size="2" class="">>, swift-corelibs-dev <</font><a href="mailto:swift-corelibs-dev@swift.org" class=""><u class=""><font size="2" color="#0000FF" class="">swift-corelibs-dev@swift.org</font></u></a><font size="2" class="">></font><font size="2" color="#5F5F5F" class=""><br class="">Date: </font><font size="2" class="">07/06/2017 01:42 PM</font><font size="2" color="#5F5F5F" class=""><br class="">Subject: </font><font size="2" class="">Re: [swift-corelibs-dev] TimeZone database</font><font size="2" color="#5F5F5F" class=""><br class="">Sent by: </font><a href="mailto:alblue@apple.com" class=""><u class=""><font size="2" color="#0000FF" class="">alblue@apple.com</font></u></a></p><div class=""><br class="webkit-block-placeholder"></div><hr width="100%" size="2" align="left" noshade="" class=""><br class=""><br class=""><br class="">It looks like it's /usr/share/zoneinfo on all Ubuntu versions:<br class=""><font size="2" class=""><br class="">alblue.local[~]$ docker run -it --rm ubuntu:14.04 find /usr -name zone.tab<br class="">/usr/share/zoneinfo/zone.tab<br class="">alblue.local[~]$ docker run -it --rm ubuntu:16.04 find /usr -name zone.tab<br class="">/usr/share/zoneinfo/zone.tab<br class="">alblue.local[~]$ docker run -it --rm ubuntu:16.10 find /usr -name zone.tab<br class="">/usr/share/zoneinfo/zone.tab</font><br class=""><br class="">This is the same that's coming from CFTimeZone.c:<br class=""><u class=""><font color="#0000FF" class=""><br class=""></font></u><a href="https://github.com/apple/swift-corelibs-foundation/blob/2611dcd0d9b91fecace537838294bd85f0220503/CoreFoundation/NumberDate.subproj/CFTimeZone.c#L36-L39" class=""><u class=""><font color="#0000FF" class="">https://github.com/apple/swift-corelibs-foundation/blob/2611dcd0d9b91fecace537838294bd85f0220503/CoreFoundation/NumberDate.subproj/CFTimeZone.c#L36-L39</font></u></a><br class=""><br class="">Is it possible that the MacOS header is being included and defining TZDIR before the CFTimeZone.c file is compiled?<br class=""><br class="">Alex
<ul class=""><ul class=""><ul class=""><ul class="">On 6 Jul 2017, at 19:22, Tony Parker via swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" class=""><u class=""><font color="#0000FF" class="">swift-corelibs-dev@swift.org</font></u></a>> wrote:<br class=""><br class="">Is the path to zoneinfo different on the Ubuntu docker image?<br class=""><br class="">- Tony
<ul class=""><ul class=""><ul class=""><ul class="">On Jul 6, 2017, at 9:36 AM, Youming Lin <<a href="mailto:ylin@us.ibm.com" class=""><u class=""><font color="#0000FF" class="">ylin@us.ibm.com</font></u></a>> wrote:
<p class=""><font size="2" class="">We were seeing this on Travis too. Specifically, on a Travis matrix build using Swift 3.1.1 on a Ubuntu 16.04 docker image running inside a Travis 14.04 VM.<br class=""><br class="">The issue was specific to the Ubuntu 16.04 docker image; when I tested in Ubuntu 16.04 OS as a guest VM, the issue went away.<br class=""><br class="">Thanks,<br class=""><br class="">Youming Lin<br class="">IBM Cloud, Swift@IBM, Kitura developer<br class="">Austin, TX<br class="">GitHub: @youming-lin</font><br class=""><br class=""><graycol.gif><font size="2" color="#424282" class="">Tony Parker via swift-corelibs-dev ---07/06/2017 10:31:15 AM---Yes, we’re discussing this one internally too and trying to figure out what the right answer is. May</font><font size="2" color="#5F5F5F" class=""><br class=""><br class="">From: </font><font size="2" class="">Tony Parker via swift-corelibs-dev <</font><a href="mailto:swift-corelibs-dev@swift.org" class=""><u class=""><font size="2" color="#0000FF" class="">swift-corelibs-dev@swift.org</font></u></a><font size="2" class="">></font><font size="2" color="#5F5F5F" class=""><br class="">To: </font><font size="2" class="">Ian Partridge <</font><a href="mailto:ian@poncho.org.uk" class=""><u class=""><font size="2" color="#0000FF" class="">ian@poncho.org.uk</font></u></a><font size="2" class="">></font><font size="2" color="#5F5F5F" class=""><br class="">Cc: </font><font size="2" class="">swift-corelibs-dev <</font><a href="mailto:swift-corelibs-dev@swift.org" class=""><u class=""><font size="2" color="#0000FF" class="">swift-corelibs-dev@swift.org</font></u></a><font size="2" class="">></font><font size="2" color="#5F5F5F" class=""><br class="">Date: </font><font size="2" class="">07/06/2017 10:31 AM</font><font size="2" color="#5F5F5F" class=""><br class="">Subject: </font><font size="2" class="">Re: [swift-corelibs-dev] TimeZone database</font><font size="2" color="#5F5F5F" class=""><br class="">Sent by: </font><a href="mailto:swift-corelibs-dev-bounces@swift.org" class=""><u class=""><font size="2" color="#0000FF" class="">swift-corelibs-dev-bounces@swift.org</font></u></a></p><p class=""><br class=""></p><hr width="100%" size="2" align="left" noshade="" class=""><br class=""><br class=""><br class="">Yes, we’re discussing this one internally too and trying to figure out what the right answer is. Maybe the best solution for now is to find a good mechanism to check the underlying version of the OS and split it out into a function as you suggest.<br class=""><br class="">- Tony
<ul class=""><ul class=""><ul class=""><ul class=""><ul class=""><ul class=""><ul class=""><ul class="">On Jul 6, 2017, at 7:37 AM, Ian Partridge via swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" class=""><u class=""><font color="#0000FF" class="">swift-corelibs-dev@swift.org</font></u></a>> wrote:<font size="2" face="Helvetica" class=""><br class=""><br class="">Good shout Simon, you are right. I'm on Sierra. Compare and contrast:<br class=""><br class="">/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/tzfile.h<br class="">#define TZDIR "/usr/share/zoneinfo"<br class=""><br class="">/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/tzfile.h<br class="">#define TZDIR "/var/db/timezone/zoneinfo"<br class=""><br class="">so I guess if I installed the High Sierra beta it would work OK.<br class=""><br class="">I hacked CF to force it to use /usr/share/zoneinfo and TestFoundation<br class="">is much happier, but that's not a solution.<br class=""><br class="">On 6 July 2017 at 15:20, Simon Evans <</font><a href="mailto:si@si.org" class=""><u class=""><font size="2" color="#0000FF" face="Helvetica" class="">si@si.org</font></u></a><font size="2" face="Helvetica" class="">> wrote:</font><ul class=""><ul class=""><ul class=""><ul class=""><ul class=""><ul class=""><ul class=""><ul class=""><font size="2" face="Helvetica" class="">Ian<br class=""><br class="">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?<br class=""><br class="">If it has indeed moved between 10.12 and 10.13 it may require a runtime version check to dynamically return TZDIR.<br class=""><br class="">Simon</font><ul class=""><ul class=""><ul class=""><ul class=""><ul class=""><ul class=""><ul class=""><ul class=""><font size="2" face="Helvetica" class="">On 6 Jul 2017, at 15:09, Ian Partridge via swift-corelibs-dev <</font><a href="mailto:swift-corelibs-dev@swift.org" class=""><u class=""><font size="2" color="#0000FF" face="Helvetica" class="">swift-corelibs-dev@swift.org</font></u></a><font size="2" face="Helvetica" class="">> wrote:<br class=""><br class="">Hi,<br class=""><br class="">I'm seeing quite a lot of tests failing when running the<br class="">TestFoundation target in Xcode. The failures are timezone related.<br class="">Most simply, the code<br class=""><br class="">let timeZone = TimeZone(abbreviation: "GMT")<br class=""><br class="">is returning nil.<br class=""><br class="">Walking through the CF code which sets things up, it seems to be<br class="">trying to read the timezone database from<br class="">/var/db/timezone/zoneinfo/zone.tab which doesn't exist on my macOS<br class="">system.<br class=""><br class="">/usr/share/zoneinfo/zone.tab is there and seems to be the right<br class="">location (?), but CF is picking up TZDIR from tzfile.h which says:<br class=""><br class="">#define TZDIR "/var/db/timezone/zoneinfo"<br class=""><br class="">Any thoughts? I feel like I'm missing something obvious and have gone<br class="">too far down the rabbit hole.<br class=""><br class="">--<br class="">Ian Partridge<br class="">_______________________________________________<br class="">swift-corelibs-dev mailing list</font><u class=""><font color="#0000FF" class=""><br class=""></font></u><a href="mailto:swift-corelibs-dev@swift.org" class=""><u class=""><font size="2" color="#0000FF" face="Helvetica" class="">swift-corelibs-dev@swift.org</font></u></a><u class=""><font color="#0000FF" class=""><br class=""></font></u><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" class=""><u class=""><font size="2" color="#0000FF" face="Helvetica" class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</font></u></a></ul></ul></ul></ul></ul></ul></ul></ul></ul></ul></ul></ul></ul></ul></ul></ul><font size="2" face="Helvetica" class=""><br class=""><br class=""><br class="">-- <br class="">Ian Partridge<br class="">_______________________________________________<br class="">swift-corelibs-dev mailing list</font><u class=""><font color="#0000FF" class=""><br class=""></font></u><a href="mailto:swift-corelibs-dev@swift.org" class=""><u class=""><font size="2" color="#0000FF" face="Helvetica" class="">swift-corelibs-dev@swift.org</font></u></a><u class=""><font color="#0000FF" class=""><br class=""></font></u><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" class=""><u class=""><font size="2" color="#0000FF" face="Helvetica" class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</font></u></a></ul></ul></ul></ul></ul></ul></ul></ul><tt class=""><font size="2" class="">_______________________________________________<br class="">swift-corelibs-dev mailing list</font></tt><u class=""><font color="#0000FF" class=""><br class=""></font></u><a href="mailto:swift-corelibs-dev@swift.org" class=""><tt class=""><u class=""><font size="2" color="#0000FF" class="">swift-corelibs-dev@swift.org</font></u></tt></a><u class=""><font color="#0000FF" class=""><br class=""></font></u><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" class=""><tt class=""><u class=""><font size="2" color="#0000FF" class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</font></u></tt></a><br class=""><br class=""></ul></ul></ul></ul><br class="">_______________________________________________<br class="">swift-corelibs-dev mailing list<u class=""><font color="#0000FF" class=""><br class=""></font></u><a href="mailto:swift-corelibs-dev@swift.org" class=""><u class=""><font color="#0000FF" class="">swift-corelibs-dev@swift.org</font></u></a><u class=""><font color="#0000FF" class=""><br class=""></font></u><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" class=""><u class=""><font color="#0000FF" class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</font></u></a></ul></ul></ul></ul><br class=""><br class=""><br class="">_______________________________________________<br class="">swift-corelibs-dev mailing list<u class=""><font color="#0000FF" class=""><br class=""></font></u><a href="mailto:swift-corelibs-dev@swift.org" class=""><u class=""><font color="#0000FF" class="">swift-corelibs-dev@swift.org</font></u></a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a></ul></ul><br class=""><br class=""><br class="">
</div>
_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev<br class=""></div></blockquote></div><br class=""></div></body></html>