Permalink
Browse files

Fixing timezone bug in localized_time_spec

  • Loading branch information...
1 parent 1172eb9 commit 2b50247fda3683efce97fc73e68559c19a1a91c3 Cameron Dutro committed Mar 2, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 spec/localized/localized_time_spec.rb
@@ -70,10 +70,10 @@
describe "#with_timezone" do
it "calculates the right time depending on the timezone" do
- time = Time.local(2000, 5, 12, 22, 5).localize
- time.to_s.should == "5:05:00 a.m."
- time.with_timezone("America/Los_Angeles").to_s.should == "10:05:00 p.m."
- time.with_timezone("America/New_York").to_s.should == "1:05:00 a.m."
+ time = Time.utc(2000, 5, 12, 22, 5).localize
+ time.to_s.should == "10:05:00 p.m."
+ time.with_timezone("America/Los_Angeles").to_s.should == "3:05:00 p.m."
+ time.with_timezone("America/New_York").to_s.should == "6:05:00 p.m."
end
end

0 comments on commit 2b50247

Please sign in to comment.