A Countdown Tracker That Handles DST, Timezones, and Calendar-Day Math Correctly "Days between two dates" sounds trivial, but (to - from) / 86400000 gives wrong answers around DST transitions and can even be off by a day depending on local timezone vs UTC. The correct approach: convert both dates to UTC midnight, subtract, divide. That way a "day" is always 24 hours and the answer is in calenda