Fix bugs in date/time handling and initial code to change time zones

Signed-off-by: Simon Busch <morphis@gravedo.de>