Hi Community
I have implemented event forwarding for another server to handle monitoring task,
However, It seems the webhook is sending date and time in 12hrs format and not 24hrs format.
Here is the sample payload as received from webhook:
2025-11-24 13:24:22,972 | INFO | worker |
Payload = {'id': 0, 'attributes': {'type': 18, 'sat': 6, 'ip': '*****', 'distance': 40.96797200079473, 'totalDistance': 10256714.937698772, 'motion': True, 'ignition': True, 'batteryLevel': 100, 'hours': 372673990}, 'deviceId': 164, 'protocol': 'gt06', 'serverTime': '2025-11-24T02:08:24.173+00:00', 'deviceTime': '2025-11-24T02:08:23.000+00:00', 'fixTime': '2025-11-24T02:08:23.000+00:00', 'valid': True, 'latitude': *******, 'longitude': , 'altitude': 0.0, 'speed': 15.658753, 'course': 36.0, 'address': '**', 'accuracy': 0.0, 'network': {'radioType': 'gsm', 'considerIp': False, 'cellTowers': [{'cellId': 30777, 'locationAreaCode': ****, 'mobileCountryCode': 621, 'mobileNetworkCode': 30}]}, 'geofenceIds': None}
You would see that all time groups re reporting for 2AM GMT +0
however, The actual time is 2Pm which should have been 14:08...
here is the log from my app just to compare
2025-11-24 13:24:22,806 | INFO | worker | [Urgent WORKER] --- raw-ServerTime from Traccar = 2025-11-24T02:08:22.876+00:00
2025-11-24 13:24:22,806 | INFO | worker | [Urgent WORKER] --- raw-FixTime from Traccar = 2025-11-24T02:08:19.000+00:00
2025-11-24 13:24:22,807 | INFO | worker | [Urgent WORKER] --- raw-DeviceTime from Traccar = 2025-11-24T02:08:19.000+00:00
2025-11-24 13:24:22,807 | INFO | worker | [Urgent WORKER] --- ServerTime saved to DB = 2025-11-24 02:08:22.876000+00:002025-11-24 13:17:37,804 | INFO | monitor | [URGENT NEW evaluator] now=2025-11-24 14:08:37.756577+00:00 (Here is the current server time or actual time)
however when I run the code between 1Am till 11AM, I get almost accurate value because time is in the same format.
Is there a way to fix this?
Hi Community
I have implemented event forwarding for another server to handle monitoring task,
However, It seems the webhook is sending date and time in 12hrs format and not 24hrs format.
Here is the sample payload as received from webhook:
2025-11-24 13:24:22,972 | INFO | worker |
Payload = {'id': 0, 'attributes': {'type': 18, 'sat': 6, 'ip': '*****', 'distance': 40.96797200079473, 'totalDistance': 10256714.937698772, 'motion': True, 'ignition': True, 'batteryLevel': 100, 'hours': 372673990}, 'deviceId': 164, 'protocol': 'gt06', 'serverTime': '2025-11-24T02:08:24.173+00:00', 'deviceTime': '2025-11-24T02:08:23.000+00:00', 'fixTime': '2025-11-24T02:08:23.000+00:00', 'valid': True, 'latitude': *******, 'longitude': , 'altitude': 0.0, 'speed': 15.658753, 'course': 36.0, 'address': '**', 'accuracy': 0.0, 'network': {'radioType': 'gsm', 'considerIp': False, 'cellTowers': [{'cellId': 30777, 'locationAreaCode': ****, 'mobileCountryCode': 621, 'mobileNetworkCode': 30}]}, 'geofenceIds': None}
You would see that all time groups re reporting for 2AM GMT +0
however, The actual time is 2Pm which should have been 14:08...
here is the log from my app just to compare
however when I run the code between 1Am till 11AM, I get almost accurate value because time is in the same format.
Is there a way to fix this?