Jekyll.set_timezone accepts just the timezone, not the config

This commit is contained in:
Parker Moore 2013-04-15 15:39:36 +02:00
parent b68d33ed8b
commit b4f68baafb
1 changed files with 4 additions and 6 deletions

View File

@ -74,19 +74,17 @@ module Jekyll
# Merge DEFAULTS < _config.yml < override # Merge DEFAULTS < _config.yml < override
config = config.deep_merge(override).stringify_keys config = config.deep_merge(override).stringify_keys
set_timezone(config) set_timezone(config['timezone']) if config['timezone']
config config
end end
# Static: Set the TZ environment variable to use the timezone specified # Static: Set the TZ environment variable to use the timezone specified
# #
# config - the Jekyll::Configuration generated by Jekyll.configuration # timezone - the IANA Time Zone
# #
# Returns nothing # Returns nothing
def self.set_timezone(config) def self.set_timezone(timezone)
if config['timezone'] ENV['TZ'] = timezone
ENV['TZ'] = config['timezone']
end
end end
end end