UCSD-E4E / ASM-rpi-node

Aye-Aye Sleep Monitoring Project Raspberry Pi Node
MIT License
0 stars 0 forks source link

[Bug]: Log timestamps are not synchronized with server #26

Open ntlhui opened 2 years ago

ntlhui commented 2 years ago

Commit Hash

d9237a7

Steps to Reproduce?

  1. Run Server
  2. Run Sensor Node
  3. Compare timestamp of heartbeat

Observed Behavior

Server timestamps are in UTC, Pi timestamps are sometimes in PST, sometimes in GMT

Desired Behavior

Expect the same timezone

Component

On Box Sensor Node

Relevant Sensor Node log output

2021-11-22 15:25:47,795 - RemoteSensorNode - INFO - Queued Packet E4E_Heartbeat(src=a4a5090c-fc41-47d4-a180-e82cf8bfc899, dest=a4a5090c-fc41-47d4-a180-e82cf8bfc899, timestamp=2021-11-22 15:25:47.795814)
2021-11-22 15:25:47,796 - RemoteSensorNode - INFO - Sending Packet E4E_Heartbeat(src=a4a5090c-fc41-47d4-a180-e82cf8bfc899, dest=a4a5090c-fc41-47d4-a180-e82cf8bfc899, timestamp=2021-11-22 15:25:47.795814)

2021-11-22 07:42:23,793 - OnBoxSensorNode - INFO - Queued Packet E4E_Heartbeat(src=a105a7ea-3eae-11ec-8446-a0afbd87594c, dest=a105a7ea-3eae-11ec-8446-a0afbd87594c, timestamp=2021-11-22 07:42:23.793840)
2021-11-22 07:42:23,794 - OnBoxSensorNode - INFO - Sending Packet E4E_Heartbeat(src=a105a7ea-3eae-11ec-8446-a0afbd87594c, dest=a105a7ea-3eae-11ec-8446-a0afbd87594c, timestamp=2021-11-22 07:42:23.793840)

Relevant Sensor Node configuration

No response

Relevant Server log output

2021-11-22 15:42:23,804 - ClientHandler - INFO - Got heartbeat from a105a7ea-3eae-11ec-8446-a0afbd87594c (Auto-registered device) at 2021-11-22 15:42:23.793000
2021-11-22 15:42:47,812 - ClientHandler - INFO - Got heartbeat from a4a5090c-fc41-47d4-a180-e82cf8bfc899 (Auto-registered device) at 2021-11-22 15:42:47.805000

Relevant Server configuration

No response

ntlhui commented 1 year ago

Propose changing all timestamps to ISO 8601 timestamps