Back to Aurora Vision Library Lite website

You are here: Start » System » OPC UA » OPCUATimestampToTimestamp

OPCUATimestampToTimestamp


Header: STD.h
Namespace: avl

Converts the OPC UA DateTime timestamp value to Timestamp

Syntax

C++
Python
 
void avl::OPCUATimestampToTimestamp
(
	atl::int64 inOPCUATimestamp,
	avl::Timestamp& outTimestamp
)

Parameters

Name Type Range Default Description
Input value inOPCUATimestamp int64 0 - 2650467743999999999 OPC UA DateTime timestamp value
Output value outTimestamp Timestamp& Output timestamp

Description

The OPC UA DateTime or UtcTime timestamp data types are representing the date and time point as a 64bit number of 100 nanosecond intervals since January 1, 1601. In the vision application those data types are represented by the internal Long type.

This filter allows to convert this timestamp counter into AVS-specific Timestamp type, by taking the OPC UA DateTime value on the inOPCUATimestamp input and converting it to a Timestamp on the outTimestamp output.

The value on the inOPCUATimestamp input must not be negative.

Please note that this filter does not have access to the timezone of the processed date and time. In particular, this filter does not know whether the source timestamp is in UTC or in the current (server) timezone (it is assumed to be in UTC), and it needs to be taken under consideration separately when working with the output of this filter.

For further processing, see TimestampToDateTime and FormatDateTimeToString filters.