NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: kevin plummer on August 19, 2015, 05:47:22 PM

Title: UTC
Post by: kevin plummer on August 19, 2015, 05:47:22 PM
Hi All,

I'm creating a web service and want to date\time stamp records so I can pull all records since last request. As this request will be coming from different time zones I wanted to stamp with UTC. Anyone know an easy way to calculate the UTC in Clarion?

Cheers,

Kevin
Title: Re: UTC
Post by: MyBrainIsFull on August 19, 2015, 07:42:33 PM
Hi Kev, email me you land line and I will call you.

nettalk@3d.com.au

Title: Re: UTC
Post by: kevin plummer on August 19, 2015, 08:18:23 PM
done
Title: Re: UTC
Post by: Larry Sand on August 24, 2015, 02:30:28 PM
Wow, awesome share!
Title: Re: UTC
Post by: Bruce on August 24, 2015, 10:29:20 PM
Actually NetTalk has code for doing this - at least in 8.60 or later.

the structure is

utctime            Group(NET_SYSTEMTIME).

the code is

  OS_GetSystemTime(utctime)


NET_SYSTEMTIME is a group structure declared in NetAll.Inc

If all you are doing is timestamping with a view to comparing records later then there is also a method;

net.GetElapsedTimeUTC  (<pBaseDate>)

the basedate defaults to Jan 1 1970. The result is a REAL (not a LONG) and is the number of milliseconds since the base date, UTC.

Cheers
Bruce