Last active
December 5, 2015 08:39
-
-
Save kachick/7bb3fc0a6caf0c751ff6 to your computer and use it in GitHub Desktop.
頭の中では日本時間で考えたいが、実際にはUTCで扱わなきゃいけないというツラさを解消したい
This file contains hidden or 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
| def utc_from_jst(*args) | |
| ActiveSupport::TimeZone.new('Asia/Tokyo').utc_offset.seconds.ago Time.zone.local(*args) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment