aisstream / issues

7 stars 3 forks source link

[Question] Timestamp #57

Open loopodoopo opened 6 months ago

loopodoopo commented 6 months ago

I am currently reviewing the data associated with the Timestamp field and have encountered an unexpected format. The field is displaying a relatively low integer value. Could you please clarify what this value represents?

Initially, I anticipated encountering a UNIX Timestamp format.

aisstream commented 6 months ago

The definition of the timestamp field can be found here: https://www.navcen.uscg.gov/ais-class-a-reports. The definition they provide is as follows

UTC second when the report was generated by the electronic position system (EPFS) (0-59, or 60 if time stamp is not available, which should also be the default value, or 61 if positioning system is in manual input mode, or 62 if electronic position fixing system operates in estimated (dead reckoning) mode, or 63 if the positioning system is inoperative)

If you would like the time the message was sent you can get the time_utc field from the Metadata field/object sent with the message.