Last active
August 29, 2015 14:02
-
-
Save penso/9f1f20dc62ce4abd5b61 to your computer and use it in GitHub Desktop.
Xcode6-beta crash on swift code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copy paste this in your playground | |
// sent at rdar://17316238 | |
import Cocoa | |
var date_string = "2014/06/14 20:05:13 +0000" | |
var rfc3339DateFormatter = NSDateFormatter() | |
rfc3339DateFormatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") | |
rfc3339DateFormatter.dateFormat = "yyyy/MM/dd HH:mm:ss Z" | |
rfc3339DateFormatter.timeZone = NSTimeZone(forSecondsFromGMT: 0) | |
// Working | |
rfc3339DateFormatter.dateFromString(date_string) | |
var options = Dictionary<String, AnyObject>() | |
options["send_at"] = date_string | |
// Working | |
var send_at = options["send_at"] as String! | |
rfc3339DateFormatter.dateFromString(send_at) | |
// Uncomment this for crashing xcode | |
// rfc3339DateFormatter.dateFromString(options["send_at"] as String!) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment