The field tm_isdst needs to be set to a negative value for mktime to apply the local daylight saving time rules.
Obviously, times are still going to be wrong when the time zones of the devices don't match. But as long as they do, this should actually result in correct times, except for cases where there is ambiguity due to DST (but that is unfixable as long as the device only reports local times without timezone offset).
The field tm_isdst needs to be set to a negative value for mktime to apply the local daylight saving time rules.
Obviously, times are still going to be wrong when the time zones of the devices don't match. But as long as they do, this should actually result in correct times, except for cases where there is ambiguity due to DST (but that is unfixable as long as the device only reports local times without timezone offset).