Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: escpodgames on January 30, 2014, 12:09:45 AM
-
Hi,
What I need is a universal time value from a server, this is so I can check the time passed since a previous time without relying on the device (which is changeable but the user) there are a bunch of servers like -
http://www.pool.ntp.org/en/
Just wondering if anyone else has tried to take this ... I assume the network actions will be needed.
-
Here is my solution for future humans :)
Use the action WWWPOST or WWWPOST Mobile if on mobile. Have the url point to here:
http://www.timeapi.org/utc/now
This will get you the UTC or Universal Time Clock. You then need to use Get Substring to get the month, day, year, etc into individual strings. Use Build String to recombine the date time into UNIX time which Playmaker actions use :)
Hope this helps!
-
SUPER THANKS! ;D
-
You also have the epoch time actions that might help. They should be on the ecosystem (maybe - snipt gone)
http://hutonggames.com/playmakerforum/index.php?topic=13541.0
-
It appears that http://www.timeapi.org/utc/now is no longer working.
@dudebxl
I have tried to use the Epoch actions but always get back the same time (01/01/1970 13:00) How are these actions used to get the correct time?
-
this is get UTC time action, maybe it helps
https://hutonggames.com/playmakerforum/index.php?PHPSESSID=f8734deef84ce369bd7503e0d96f4f09;topic=24800