Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Dear Community,
Now we have dozens of devices and thingworx collects process data to influxdb through kepware, but we found that the time of all these devices OPC UA is not correct, so the time recorded to the database is not correct, if we go to reset one by one, it will waste a lot of time, so if there is any setting to use thingworx server's current time to record to the database? That is, when kepware data changes, I record the changed value, but the time uses the current time of the system. I think it can be solved by Subscription, but there are very many devices and properties, and it's a waste of time to change them, do you have any good solution? thanks.
Best Regards,
Chason
Solved! Go to Solution.
If you try to save current time, create a extra column and put value inside it. If you using services so you can use new Date(); Or in DB itself you can create a new column and make a default value as getDate() so that everytime a new record gets inserted you get time of insertion.
Another approach if your server is in different timezone then you need a offset time like for India offset is +5.5 (which is nothing but no of hours ahead of GMT)
Regards
Shyam
If you try to save current time, create a extra column and put value inside it. If you using services so you can use new Date(); Or in DB itself you can create a new column and make a default value as getDate() so that everytime a new record gets inserted you get time of insertion.
Another approach if your server is in different timezone then you need a offset time like for India offset is +5.5 (which is nothing but no of hours ahead of GMT)
Regards
Shyam
Thank you very much for your quick reply, I think DB itself create a new column and make a default value as getDate() maybe more better for me, it will save me a lot of time.