         }
     }
 
+
     var dateFormatter: NSDateFormatter {
         if let actdate = _dateFormatter {
             return actdate
-       }
-
-       _dateFormatter = NSDateFormatter()
-       _dateFormatter!.dateFormat = "yyyy-MM-dd' 'HH:mm:ssZZZ"
-       _dateFormatter!.timeZone = NSTimeZone(name: "UTC")
-
-       return _dateFormatter!
+        }
+
+        _dateFormatter = NSDateFormatter()
+        _dateFormatter!.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZ"
+        _dateFormatter!.timeZone = NSTimeZone(name: "UTC")
+        return _dateFormatter!
     }
     var _dateFormatter: NSDateFormatter? = nil
+
 
     public func dateFromString(string: String) -> NSDate!
     {

            let time = NSDate(timeIntervalSinceNow: interval)
            fetchRequest.predicate = NSPredicate(format: "plotTime < %@", time)

            do {
                let result = try childContext.executeFetchRequest(fetchRequest) as! [NSManagedObject]

                for object in result {
                    childContext.deleteObject(object)
                }

                try childContext.save()

                childContext.processPendingChanges()

                if let moc = self.managedObjectContext {
                    moc.performBlock {
                        do {
                            try moc.save()
                            moc.processPendingChanges()
                            completionHandler?()
                        } catch {
                            DLOG("Save failed: \(error)")
                            completionHandler?()
                        }
                    }
                }
            } catch {

import Foundation
import CoreData

#if os(iOS)
import MobileCoreServices
import CoreSpotlight
#endif


@objc(Datamanager)
public class Datamanager : NSObject
{
    let _formatterQueue: dispatch_queue_t = dispatch_queue_create("formatter queue", nil)


