get system or device date time?

get system or device date time?
0.0 0


hello all,
i am trying use cocos2dx to create my first application(iphone)
but i have a question about how to get iphone / system date time.
anyone can provide me support?


You need to call iOS obj-c to do that…

Download my attached files, unzip to your projects folder (leave them in their ObjCCalls folder). Add the contents to your project (drag into your “classes” folder in the project view in XCode.

Call with this line:

std::string datetime = ObjCCalls::MakeDateTimeString();


Download this:

See the “MakeDateTimeString” function to change it to what you want (date format, etc).


Many Thanks
It Work!
Thank you so much!