Posted 22 November 2015 - 11:45 AM
Hello there,
I created a little PHP script and a little CC API to get the real time. It is really simple.
Downloads:
The API (Pastebin: UW2Pf1UW)
An example (Pastebin: TXWzqCbv)
Here's how to use it(Assuming it is loaded in as "timeapi")
If you take a look at the output of the web PHP script you will see that it also gives back the date, if you want you can code your own API which also contains getting the date.
If you want I will publish the source code of the PHP script.
If you think this is useful or you have something I could improve, tell me!
Luca_S
I created a little PHP script and a little CC API to get the real time. It is really simple.
Downloads:
The API (Pastebin: UW2Pf1UW)
An example (Pastebin: TXWzqCbv)
Here's how to use it(Assuming it is loaded in as "timeapi")
Spoiler
--get UTC time
local hours,minutes,seconds = timeapi.getTime()
--get UTC + 4 time
local hours,minutes,seconds = timeapi.getTime(4)
--get UTC - 1 time
local hours,minutes,seconds = timeapi.getTime(-1)
--get UTC 9 1/4 time
local hours,minutes,seconds = timeapi.getTime(9,15)
--get UTC -3 1/2 time
local hours,minutes,seconds = timeapi.getTime(-3,-30)
If you want I will publish the source code of the PHP script.
If you think this is useful or you have something I could improve, tell me!
Luca_S