Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

ServerTimeStamp

More
14 Jun 2022 11:58 #10972 by support
Replied by support on topic ServerTimeStamp
Actually, there appears to be a standard PHP function for that: variant_date_to_timestamp .

- www.php.net/manual/en/function.variant-date-to-timestamp.php

It expects the local date/time as input, so in order to get the correct result, you will need to pass in the ServerTimestampLocal, and not ServerTimestamp.

Best regards
The following user(s) said Thank You: CJiwan

Please Log in or Create an account to join the conversation.

More
14 Jun 2022 10:27 #10971 by CJiwan
Replied by CJiwan on topic ServerTimeStamp
Thanks for your answeer.

The link talk about a timestamp but not in Unix format.
But, maybe I'm stuppid :-), i do not find how to convert this timestamp to a DateTime class from PHP.

Christian

Please Log in or Create an account to join the conversation.

More
13 Jun 2022 05:39 #10967 by support
Replied by support on topic ServerTimeStamp
Hello.
There might not be a ready-to-made function available for this, so some programming will be required.

Is the problem that
1) you do not know how is the date/time used in UAAttributeData.ServerTimestamp represented, or
2) you know how it is represented, but you do not know how to convert that representation to "yours"?

Regarding the first case: You can basically use the information listed here: docs.microsoft.com/en-us/cpp/atl-mfc-shared/date-type?view=msvc-170 .
This should be enough to write the conversion routines. But if you still have a problem, let me know.

Best regards

Please Log in or Create an account to join the conversation.

More
12 Jun 2022 18:53 #10965 by CJiwan
ServerTimeStamp was created by CJiwan
Hi,

In a PHP project I try to convert the ServerTimestamp (obtained in the AttributeData of the result of a reading or subscription) to the DataTime format to be able to store it in a MySQL DB.

Can you help me, i do not find the good methode.

Tanks

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.043 seconds