why aint work let time = [[NSDate date] timeIntervalSince1970];
- User
why aint work
let time = [[NSDate date] timeIntervalSince1970];
- Assistant
The code snippet you provided seems to be using Objective-C syntax. Here,
NSDateis a class from the Foundation framework, anddateis a method that returns the current date and time. ThetimeIntervalSince1970method returns the time interval between the current date and time and the first instant of 1 January 1970, GMT (which is also known as the Unix epoch).If the line of code "let time = [[NSDate date] timeIntervalSince1970];" is not working as expected, there might be a few reasons for it: