Wrong timestamp in TTN backend

We have an issue regarding packet timestamps in TTN. We are using the Kerlink CPF, which is based on the Semtech SPF. The CPF uses a packet buffer and is able to retransfer packets, that are not acknowledged by the backend.

We found, that in TTN the packet time is different from the packettime sent by the gateway. It seems, TTN uses the time of reception and not time, send with the packet.

Here is a packet sent:

“rxpk”:[
{
“aesk”:0,
“brd”:21,
“codr”:“4/5”,
“data”:“gHz+ACQAiSXKLDjaahsZoK8pmA==”,
“datr”:“SF9BW125”,
“delayed”:true, -> This means that it is a delayed message
“freq”:868.1,
“jver”:2,
“modu”:“LORA”,
“rsig”:[{“ant”:0,“chan”:5,“lsnr”:-11.0,“rssic”:-122}],
“size”:19,
“stat”:1,
“time”:“2019-11-25T13:39:14.670493Z”, -> this is the real reception timestamp
“tmst”:422828540
},

This is the time in the backend:

packetTime

So, the time of reception was 13:39:14, but the time in TTN is 13:39:50.

Coud someone please check, if this is an issue in the TTN backend? Or maybe the timestamp is not used for some rason and substituted by current time??

Finally got some help on slack:

htdvisser 8:23 AM

The metadata.time is server time, the metadata.gateways[].time is the time reported by the gateway, see https://www.thethingsnetwork.org/docs/applications/mqtt/api.html#uplink-messages