Datetime Time Offset Fix

Formalized fix found by @Norbyte

Replaced unixtime2tm.c with one from php-src.
(https://github.com/php/php-src/blob/PHP-5.5.8/ext/date/lib/unixtime2tm.c)

Fixes #1671