Created
October 25, 2013 11:33
-
-
Save senny/7153270 to your computer and use it in GitHub Desktop.
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 test_timestamp_with_zone_values_without_rails_time_zone_support | |
p @connection.execute('SHOW TIME ZONE', 'SCHEMA').first["TimeZone"] | |
with_timezone_config default: :local, aware_attributes: false do | |
@connection.reconnect! | |
@connection.execute("SET time zone 'America/Jamaica'", 'SCHEMA') | |
@first_timestamp_with_zone = PostgresqlTimestampWithZone.find(1) | |
assert_equal Time.utc(2010,1,1, 11,0,0), @first_timestamp_with_zone.time | |
assert_instance_of Time, @first_timestamp_with_zone.time | |
p @connection.execute('SHOW TIME ZONE', 'SCHEMA').first["TimeZone"] | |
end | |
ensure | |
@connection.reconnect! | |
p @connection.execute('SHOW TIME ZONE', 'SCHEMA').first["TimeZone"] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"UTC"
"America/Jamaica"
"UTC"