whoozle / android-file-transfer-linux

Android File Transfer for Linux (and macOS!)
http://whoozle.github.io/android-file-transfer-linux/
GNU Lesser General Public License v2.1
1.46k stars 121 forks source link

Fix DST handling in DateTime conversion #292

Closed janh closed 2 years ago

janh commented 2 years ago

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).