Set the timezone for the process

This commit is contained in:
Parker Moore 2013-04-13 16:40:05 +02:00
parent 5bcce7a1f1
commit b249289b9d
2 changed files with 17 additions and 1 deletions

View File

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

View File

@ -10,6 +10,8 @@ module Jekyll
'layouts' => '_layouts',
'keep_files' => ['.git','.svn'],
'timezone' => nil # use the local timezone
'safe' => false,
'show_drafts' => nil,
'limit_posts' => nil,