Control of communication with timestamp
Hi,
I wan´t to make a heartbeat function to control my wireless device (LoraWan) so it is communicating with my bOS server.
I get a timestamp as a string, and i would like to check the string with the time on the bOS server. I think the month and date should be enough. Any suggestions on how to do this the best way. I started to try to parse out the string but I didn´t manage to parse it right. The string that is provided: 2025-05-20 09:26:05 and this will change every day.
Best regards Timi

Hello,
Yeah, it's not easy to parse the date time.
I was trying to do that, but still not finished, but I'll get there.
I think that one of the possibilities would be: parse your incoming lorawan timestamp, parse each value, create a task to compose a string with those values in the bOS format, compare the bOS time with the converted lorawan timestamp and do your thing.
I'm not an expert with the parsing stuff, and I did get some results, but not yet 100% working.
If someone has some already created task to parse the data time with 0's included (for example have 05 instead of 5, which means adding a zero when there isn't one), be my guest to share in the meanwhile :)
Best regards