Fraunhofer-FIT-DIEN / iec104-python

A Python module to simulate SCADA and RTU communication over protocol 60870-5-104 to research ICT behavior in power grids.
https://iec104-python.readthedocs.io/latest/python/index.html
GNU General Public License v3.0
50 stars 9 forks source link

Sending timestamps not in UTC #13

Closed ArtTron22 closed 8 months ago

ArtTron22 commented 8 months ago

Hello!

I am trying to adjust the time of a timestamp when sending point data, and I would like to know how to do so. When sending data about a point with the type "type=c 104.Type.M_ME_TF_1", I want the timestamp to be in the local time zone of the server, rather than the UTC time. For example, the server's local time zone is Europe/Istanbul. Could you please help me with this?

Thank you for your attention.

m-unkel commented 8 months ago

Hi there, since the protocol isn't timezone aware it would be better to use UTC time and instead format the time into a desired timezone in the presentation layer.

But it should be possible to manually set a timestamp for a measurement value via the set method. point.set(value=123, timestamp_ms=...) I tried the last option and found a bug there that will be fixed in the upcoming release 1.8.0 within the next days .

ArtTron22 commented 8 months ago

Thank you for your answer. And when do you plan to release version 1.8.0, approximately?

m-unkel commented 8 months ago

Within the next 24 hours.

m-unkel commented 8 months ago

Version 1.8.0 has been released. Please provide feedback on whether the issue has been resolved.

ArtTron22 commented 8 months ago

Thank you so much! Great update!