0

I have an app that records video and displays them in a certain order. The videos recorded in my app has the correct date, but the times were all the same. So, all of the video recorded today show: 2015-07-31 13:15:51 +0000

I'm not setting any properties related to time in my capture session or movie output. I can't seem to find any documentation on how to do this properly. Does anyone have an idea?

Thanks!

Update: I recorded more video within the app. Turns out that the date is also wrong. It’s creation date reads the same as all the other videos created previously. For kicks, I delete the app from my phone, recorded a new video. It has the correct day and time. But after recording a second video, the date and time is the same as the previous recorded video.

yamski
  • 471
  • 4
  • 14

1 Answers1

0

It turns out that I was writing over the same file path. Creating a unique string each time solved my problem.

        let uuid = NSUUID().UUIDString
        let outputPath: NSString = "\(NSTemporaryDirectory()) + \(uuid) + output.mov"
        let outputURL = NSURL(fileURLWithPath: outputPath as String)
        movieFileOutput?.startRecordingToOutputFileURL(outputURL, recordingDelegate: self)
yamski
  • 471
  • 4
  • 14