Last active
February 15, 2016 11:27
-
-
Save matsubo/7b3c7fbe6e613d515158 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_support' | |
require 'active_support/core_ext' | |
# Wrong | |
# 2014-04-06 00:59:59 UTC | |
# should be 2014-04-05 23:59:59 UTC | |
puts 37.days.since(Time.utc(2014, 2, 27, 23, 59, 59).in_time_zone('Wellington')).utc | |
# 2014-04-05 23:59:59 UTC | |
puts 37.days.since(Time.utc(2014, 2, 27, 23, 59, 59).in_time_zone('Wellington').utc) | |
# 2014-04-04 23:59:59 UTC | |
puts 36.days.since(Time.utc(2014, 2, 27, 23, 59, 59).in_time_zone('Wellington')).utc | |
# 2014-04-04 23:59:59 UTC | |
puts 36.days.since(Time.utc(2014, 2, 27, 23, 59, 59).in_time_zone('Wellington').utc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment