We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS 10.12.6 Ubuntu 14.04 swift-DEVELOPMENT-SNAPSHOT-2017-07-26-a
md5: 5d94b02b07b6ba6083a14aadb1ff4fbb
relates to:
Issue Description:
TimeZone.current returns wrong GMT0 value.
TimeZone.current
GMT0
▿ GMT (current) - identifier: "GMT" - kind: "current" ▿ abbreviation: Optional("GMT") - some: "GMT" - secondsFromGMT: 0 - isDaylightSavingTime: false
Tested on both macOS 10.12.6 where Darwin's Foundation TimeZone.current returns
▿ Europe/Stockholm (current) - identifier: "Europe/Stockholm" - kind: "current" ▿ abbreviation: Optional("GMT+2") - some: "GMT+2" - secondsFromGMT: 7200 - isDaylightSavingTime: true
and Ubuntu 14.04 where cat /etc/timezone returns
cat /etc/timezone
Europe/Stockholm
================
It appears that __CFTimeZoneCreateSystem fails all the way down to the last fallback CFTimeZoneCreateWithTimeIntervalFromGMT(kCFAllocatorSystemDefault, 0.0); at https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/NumberDate.subproj/CFTimeZone.c#L816
__CFTimeZoneCreateSystem
CFTimeZoneCreateWithTimeIntervalFromGMT(kCFAllocatorSystemDefault, 0.0);
The text was updated successfully, but these errors were encountered:
Hopefully this PR should fix it: #1163
It was broken in #1126
Sorry, something went wrong.
Comment by Joseph Lawson (JIRA)
I meant to close SR-5598, this is still an issue on Linux
This looks to be fixed now, note that the timezone should come from /etc/localtime, /etc/timezone is used to setup the link.
/etc/localtime
/etc/timezone
$ ls -l /etc/localtime lrwxrwxrwx 1 root root 36 Apr 26 12:49 /etc/localtime -> /usr/share/zoneinfo/Europe/Stockholm $ cat sr-5596.swift import Foundation print(TimeZone.current) $ ~/swift-5.0-RELEASE-ubuntu18.04/usr/bin/swift sr-5596.swift Europe/Stockholm (current) $ TZ=America/New_York ~/swift-5.0-RELEASE-ubuntu18.04/usr/bin/swift sr-5596.swift America/New_York (current)
spevans
No branches or pull requests
Environment
macOS 10.12.6
Ubuntu 14.04
swift-DEVELOPMENT-SNAPSHOT-2017-07-26-a
Additional Detail from JIRA
md5: 5d94b02b07b6ba6083a14aadb1ff4fbb
relates to:
Issue Description:
TimeZone.current
returns wrongGMT0
value.Tested on both macOS 10.12.6 where Darwin's Foundation
TimeZone.current
returnsand Ubuntu 14.04 where
cat /etc/timezone
returns================
It appears that
__CFTimeZoneCreateSystem
fails all the way down to the last fallbackCFTimeZoneCreateWithTimeIntervalFromGMT(kCFAllocatorSystemDefault, 0.0);
at https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/NumberDate.subproj/CFTimeZone.c#L816
The text was updated successfully, but these errors were encountered: