NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: debzidoodle on April 21, 2014, 05:16:16 PM
-
Hello,
I am trying to setup an oAuth Request Token procedure. It is v1 so it requires the unix\epoch time, which is the same thing as the javascript code like this
var epochTime = (new Date).getTime()
Does NT have a way for me to get this value from server side code?
-
Hi Debra,
There are 3 methods to convert to and from Unix Epoch dates.
p_web.ClarionToUnixDate (date,time)
so the epoch date of the current date/time on the server is
p_web.ClarionToUnixDate (today(),clock())
Returns a long in "unix epoch" format. Pretty much works for dates from 1970 to 2038.
The reverse are;
p_web.UnixToClarionDate(epoch)
and
p_web.UnixToClarionTime(epoch)
Cheers
Bruce
-
Thats great! You are the man!!! Thank you :D