not a global standard 10 Northern hemisphere summer Southern hemisphere summer Formerly used daylight savings Never used daylight savings Source: https://en.wikipedia.org/wiki/Daylight_saving_time
in your tests! 18 Good Timecop.freeze(Time.zone.now) do user = User.create! assert_equal Time.zone.now, user.created_at end Better ✅ Time.use_zone "Australia/Melbourne" do now = Time.zone.parse(“2017-01-05 19:30”) Timecop.freeze(now) do user = User.create! assert_equal Time.zone.now, user.created_at end end
Consider edge cases • Today in San Francisco is tomorrow in Melbourne • End of a month: now.day > tomorrow.day • End of a year: now.month > tomorrow.month • There is something like leap seconds • Change your local time and time zone and run time critical tests