options: treat time strings as UTC times
authorJo-Philipp Wich <jo@mein.io>
Thu, 12 Apr 2018 08:51:51 +0000 (10:51 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 16 May 2018 07:04:10 +0000 (09:04 +0200)
commit0e77bf296648c5db92c269c678d27f6846de4e9f
tree850b14114f9b1c99ca04062fbfc7394d7da2a35d
parentb45e162eca2c6e913318c4552643aae2a973ae3a
options: treat time strings as UTC times

When parsing user supplied time strings, calculate an UTC time instant by
substracting the current zone offset from the result of mktime(3), then use
gmtime_r(3) to turn the time_t value back into a sanitized time structure.

This ensures that user supplied dates are not interpreted as local time.

Fixes FS#1483.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
options.c