Commit Graph

3 Commits (0fb0890a16e1b80d3af03ae6d56023b3c4392296)

Author SHA1 Message Date
Samantaz Fox e9b81276e5
Handle localtime_r() failure in j1939 timedate
When the call to localtime_r() fails (by returning NULL, as per the POSIX specification), make sure to fill the hour/minute offsets with the fallback values as specified in the J1939DA supporting information.
2026-05-05 21:47:40 +00:00
Oliver Hartkopp 15dbb474c7 j1939_timedate_cli: fix sign-compare warning
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2024-06-07 09:09:26 +02:00
Oleksij Rempel d0b04bd456 add j1939 datetime
Implement client and server side for SAE J1939-71:2002 - 5.3 pgn65254 -
Time/Date - TD.

Testing:
./j1939-timedate-srv -i vcan0 -a 0x70 &
./j1939-timedate-cli -i vcan0 -a 0x80 -r 0xff

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
2024-06-06 13:54:26 +02:00