Changed the whole algorithm for a call to mktime64 that takes care of all that details. Signed-off-by: Oscar Forner Martinez <oscar.forner.martinez@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>