NetTalk Central

Author Topic: UTC  (Read 4782 times)

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
UTC
« 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

MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: UTC
« Reply #1 on: August 19, 2015, 07:42:33 PM »
Hi Kev, email me you land line and I will call you.

nettalk@3d.com.au


kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: UTC
« Reply #2 on: August 19, 2015, 08:18:23 PM »
done

Larry Sand

  • Full Member
  • ***
  • Posts: 101
    • View Profile
Re: UTC
« Reply #3 on: August 24, 2015, 02:30:28 PM »
Wow, awesome share!

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: UTC
« Reply #4 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