Accessing Server Clock

What is the best way to access the server’s clock time from an expression?

I am currently using the now() function but it gets its time from the client PC clock.

We’ve used a SELECT CURRENT_TIMESTAMP or SELECT getdate() query to grab gateway time, assuming SQL is running on the same machine. Even if its not, we usually have a central appliance or server running a NTP server that keeps all the servers in sync, so the SQL machine may not differ too much from the gateway server.

I suppose the gateway’s time would make a good status tag, which is easy enough for us to add. However, I think you should be able to do this by simply creating an expression SQLTag, whose expression was simply “now()”. Put it in a 1 second scan class, and then reference that in your other expressions, instead of a function. SQLTags run on the gateway, so the time will be from there.

Hope this helps,