From 6b37bbc8dadb740bdb796541a7c30fd339b0f4ee Mon Sep 17 00:00:00 2001 From: Joseph Caudle Date: Thu, 21 Feb 2013 22:29:36 -0500 Subject: [PATCH] Fix intermittent build failure due to timezones Because our default timezone for the app is UTC, at certain times, some tests could fail outside of UTC. This commit fixes that by changing a single call to Time.now to Time.zone.now. --- app/models/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/post.rb b/app/models/post.rb index 3ff4fa8f4..143ca9613 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -9,7 +9,7 @@ class Post < ActiveRecord::Base def author_date_subject # slugs are created before created_at is set - time = created_at || Time.now + time = created_at || Time.zone.now "#{author.login_name} #{time.strftime("%Y%m%d")} #{subject}" end