Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Commit

Permalink
The site configuration may not always provide a 'time' setting. Closes
Browse files Browse the repository at this point in the history
…jekyll#184.

* This fixes a bug on Ruby 1.9.1 and 1.9.2 where Time.parse was being
  passed an emptry String, if the 'time' setting was not defined.
  • Loading branch information
postmodern authored and mojombo committed Aug 24, 2010
1 parent d9bc00c commit f4fb833
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions History.txt
@@ -1,6 +1,7 @@
== HEAD
* Bug Fixes
* Highlight should not be able to render local files
* The site configuration may not always provide a 'time' setting (#184)

== 0.6.2 / 2010-06-25
* Bug Fixes
Expand Down
6 changes: 5 additions & 1 deletion lib/jekyll/site.rb
Expand Up @@ -28,7 +28,11 @@ def initialize(config)
end

def reset
self.time = Time.parse(self.config['time'].to_s) || Time.now
self.time = if self.config['time']
Time.parse(self.config['time'].to_s)
else
Time.now
end
self.layouts = {}
self.posts = []
self.pages = []
Expand Down

0 comments on commit f4fb833

Please sign in to comment.