I'm an objective-c beginner and I was assigned to create an iPhone app for our client. I have some background with Java but almost no experience in this objective-c and this is my first time to developping a complete application...
Anyway, I'm currently stack at several problems. One of those problem is that I need to send an integer value for PHP's date
function from my iOS app. I've been searching around for the solution, but all of them are dealing with opposite ways (int to NSDate
), not NSDate
to integer value.
I tried solutions like answered here
but it's obvious it returns double, not an integer...
Or this
but this couldn't get the System time
.
I know I could get current system's NSDate with:
NSDate *theDay = [NSDate dateWithTimeIntervalSinceNow:[[NSTimeZone systemTimeZone] secondsFromGMT]];
But I could not figure out how to convert this to an integer (or long) value.
I just need to get the same value as we can get in Java
with System.currentTimeMillis()
.
Also, this is my first time to ask questions here in stackoverflow. So please let me know if there's anything I should do/not to do when posting questions here, etc.
Thank you.