Merge pull request #985 from FranklinChen/fix-timezone

Update reference to timezone using new config system.
This commit is contained in:
Brandon Mathis 2013-01-28 21:10:42 -08:00
commit bda5ee1e10

View File

@ -135,7 +135,7 @@ task :new_post, :title do |t, args|
title = get_stdin("Enter a title for your post: ")
end
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(configuration[:source])
time = now_in_timezone(timezone)
time = now_in_timezone(configuration[:timezone])
mkdir_p "#{configuration[:source]}/#{configuration[:posts_dir]}"
filename = "#{configuration[:source]}/#{configuration[:posts_dir]}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{configuration[:new_post_ext]}"
if File.exist?(filename)