mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-06 03:01:43 -04:00
Fix Appveyor with dst-aware cucumber steps
This commit is contained in:
@@ -163,3 +163,14 @@ def seconds_agnostic_time(time)
|
||||
hour, minutes, = time.split(":")
|
||||
"#{hour}:#{minutes}"
|
||||
end
|
||||
|
||||
# Helper method for Windows
|
||||
def dst_active?
|
||||
config = Jekyll.configuration("quiet" => true)
|
||||
ENV["TZ"] = config["timezone"]
|
||||
dst = Time.now.isdst
|
||||
|
||||
# reset variable to default state on Windows
|
||||
ENV["TZ"] = nil
|
||||
dst
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user