Wrong DeviceTime Answer

I have DLO8 Dragino gateway and a server chirpstack running on it.
I request “Device Time” after join, but the response is wrong randomly. The real time is 14:08:52, but Device Time Answer is 13:09:59. Hour difference is normal because of my location. But, there’s a huge second difference. I have repeated this test many times with TTN server by changing address in Dragino, there was no time difference. Where is my mistake? (Mostly, time information coming from the Gateway is ahead about 20-50seconds)

Does your gateway have a GPS fix? Does the RTC of your gateway reflect the correct time? Chirpstack will use the time reported by the gateway. If the time is unavailable or incorrect, then the wrong time would eventually be provided to the device.

Do check out the fake_rx_time option of the Chirpstack Gateway Bridge, which might be relevant for your usecase. When enabled, it will cause the Gateway Bridge’s time to be taken as the receive timestamp, rather than using the time indicated by the gateway.

Reported time in the gateway is updated slowly(every 10-15sconds) and looks is not correct.
When I look at console logs it looks better and correct.

How can i access fake_rx_time parameter?

This setting is in the chirpstack-gateway-bridge.toml file, as described in the documentation.

If you already have this file exposed, then you only have to modify it before restarting the Chirpstack Gateway Bridge component. Otherwise, please follow the steps for generating a new configuration file and make this file accessible to the Chirpstack Gateway Bridge.

Thank you for the prompt answer.

While this seems to have solved your problem, I would like to highlight that the documentation mentions that this method may result in less accurate time being returned because Chirpstack is unaware of the latency between it and the gateway. Whether this is better or worse than what you had before, really depends on the reason why you had to use this fake_rx_time option in the first place.

If the gateway can have a working GPS or have its RTC set correctly, perhaps those would be more ideal choices.