Page 1 of 1

How can I get the current *database* date/time returned?

Posted: Thu Oct 31, 2013 12:00 am
by Bryce

I would like to get the current date/time returned to be able to use (ie. display, calcuate on, etc...) in my app.

I want the same date and time source returned for all users (regardless of where they are located), hence I do not want to use the user's date and time on their phone, I want the date and time of the database to be returned.

How can I do this?

Thanks,

Bryce.


How can I get the current *database* date/time returned?

Posted: Thu Oct 31, 2013 12:11 am
by Igor

Hello,

You could use UTC format.
https://developer.mozilla.org/en-US/d...


How can I get the current *database* date/time returned?

Posted: Thu Oct 31, 2013 1:14 am
by Bryce

Thanks for the quick reply.

That link has a LOT of information on it. Can you be more specific please?


How can I get the current *database* date/time returned?

Posted: Thu Oct 31, 2013 1:39 am
by Igor

For example, if you want to get current UTS time you should use next methods
getUTCHours(),getUTCMinutes(),... . Also you can find examples for all of this methods.
Next doc will show you how to implement this into the appery.io application: http://docs.appery.io/documentation/u...


How can I get the current *database* date/time returned?

Posted: Thu Oct 31, 2013 5:05 am
by Bryce

Great. Thanks.