3 ms·
UTC is great for timestamps, but for time periods that are meant to be used locally your code will get complicated if you store them as UTC. For example, functi
by speleding 5y ago
UTC is great for timestamps, but for time periods that are meant to be used locally your code will get complicated if you store them as UTC. For example, functions like is_monday?(date) and length_of_period(date, date) are very simply mathematical operations if the time is local. But if you stored dates as UTC then you need a translation and take into account the edge condition that the date occurs during a DST switch.