mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 17:28:29 -05:00
Jekyll.set_timezone accepts just the timezone, not the config
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user