Set the timezone for the process
This commit is contained in:
parent
5bcce7a1f1
commit
b249289b9d
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue