Skip to content

Commit

Permalink
use UTC internally
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Jul 3, 2008
1 parent 38e515f commit 2c78234
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/comment.rb
Expand Up @@ -4,7 +4,7 @@ class Comment < ActiveRecord::Base

def self.import! filename
comment = Comment.new
comment.created_at = File.stat(filename).mtime
comment.created_at = File.stat(filename).mtime.utc
name = File.basename(filename).gsub(/\.cmt/,'')
comment.slug = name
if name =~ /^(\d+)-/
Expand Down
2 changes: 1 addition & 1 deletion app/models/post.rb
Expand Up @@ -8,7 +8,7 @@ def self.import! filename
post = Post.new
title = file.gets.strip
post.title = title unless title.empty?
post.created_at = file.mtime
post.created_at = file.mtime.utc
name = File.basename(filename)
if name =~ /^(\d+)\.txt/
post.alt = $1.to_i
Expand Down
4 changes: 2 additions & 2 deletions config/environment.rb
Expand Up @@ -55,5 +55,5 @@
# config.active_record.observers = :cacher, :garbage_collector

# Make Active Record use UTC-base instead of local time
# config.active_record.default_timezone = :utc
end
config.active_record.default_timezone = :utc
end

0 comments on commit 2c78234

Please sign in to comment.