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
|
# 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
|
||||||
|
|
Loading…
Reference in New Issue