Does that work with the daylight saving time rules for all the
timezones in the world? And are you sure it's always going
to work? Daylight saving time rules aren't static, they keep
changing.
Your method is also going to fail for dates after 2038 on
many platforms (and for other dates on other platforms).