lib/middleman-tansu/command.rb in middleman-tansu-0.1.2 vs lib/middleman-tansu/command.rb in middleman-tansu-0.1.3
- old
+ new
@@ -52,10 +52,11 @@
default: ''
def tansu(path)
paths = path.split('/')
title = paths.pop
ext = options[:file]
- Time.zone = options[:timezone] || ENV['TZ'] || 'UTC'
+ zone = options[:timezone] || ENV['TZ'] || 'UTC'
+ Time.zone = (zone != 'UTC') ? zone.downcase.capitalize : zone
date = options[:date] ? Time.zone.parse(options[:date]) : Time.zone.now
author = options[:author] || ENV['USER']
add_frontmatter = options[:frontmatter]
if Regexp.new(".html.#{ext}$") !~ title