Yeah, not to be rude (we've all been there) but that hack is bound to be borken somehow.
Really this time & timezone stuff should be handled by the OS, system calls or libs should be more sophisticated so we aren't "solving" these problems over and over again.
But I'm about to start ranting about Unicode, so I'll shut up now... ;-)
If you're near a change in daylight savings then that will go wrong.