Jekyll.set_timezone accepts just the timezone, not the config
This commit is contained in:
parent
b68d33ed8b
commit
b4f68baafb
|
@ -74,19 +74,17 @@ module Jekyll
|
|||
|
||||
# Merge DEFAULTS < _config.yml < override
|
||||
config = config.deep_merge(override).stringify_keys
|
||||
set_timezone(config)
|
||||
set_timezone(config['timezone']) if config['timezone']
|
||||
|
||||
config
|
||||
end
|
||||
|
||||
# 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
|
||||
def self.set_timezone(config)
|
||||
if config['timezone']
|
||||
ENV['TZ'] = config['timezone']
|
||||
end
|
||||
def self.set_timezone(timezone)
|
||||
ENV['TZ'] = timezone
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue