Watch out for daylight savings time switch points - there's a ton of corner cases here that could cause problems.