This project is archived and is in readonly mode.

#4948 ✓duplicate
Anil Wadghule

ActiveRecord test fail for Postgres

Reported by Anil Wadghule | June 23rd, 2010 @ 06:11 PM

Get following failed test for test_timestamp_with_zone_values_without_rails_time_zone_support test in datatype_test_postgresql.rb

 1) Failure:
test_timestamp_with_zone_values_without_rails_time_zone_support(PostgresqlDataTypeTest)
    [./test/cases/datatype_test_postgresql.rb:237:in `test_timestamp_with_zone_values_without_rails_time_zone_support'
     /Users/anil/Code/rails/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /Users/anil/Code/rails/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'
     /Users/anil/Code/rails/rails/activesupport/lib/active_support/callbacks.rb:413:in `_run_setup_callbacks'
     /Users/anil/Code/rails/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:65:in `run']:
<Fri Jan 01 11:00:00 UTC 2010> expected but was
<Fri Jan 01 16:00:00 +0530 2010>.

So here, need to assert local timezone time value in different way. As :local is different for different zones.

Can somebody point me how to assert time for local timezone?

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages