// For use with EventStore or something... let eventId = NSUUID().UUIDString println("The event id: " + eventId)
Etikett: iOS
iso 8601 timestamp in swift
func isoTimestamp() -> String { let dateFormatter = NSDateFormatter() // dateFormatter.timeZone = NSTimeZone.localTimeZone() // C# "yyyy-MM-ddTHH:mm:ss.fffZ" dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" return dateFormatter.stringFromDate(NSDate()) }