Created
December 6, 2012 18:23
-
-
Save mybuddymichael/4226779 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
# Public: Get one of the class's time properties with the correct time | |
# but also including the timezone. | |
# | |
# Returns a DateTime object. | |
[:last_sync_time, :last_parse_time, :last_connect_time].each do |attribute| | |
define_method(attribute) do | |
convert_to_timezone_without_changing_time(read_attribute(attribute), | |
read_attribute(:timezone)) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment