Skip to content

Commit

Permalink
Explore TZInfo backed ZoTime for gh-220
Browse files Browse the repository at this point in the history
Work in progress
  • Loading branch information
jmettraux committed Nov 12, 2016
1 parent 781c009 commit fbd75ef
Show file tree
Hide file tree
Showing 5 changed files with 389 additions and 310 deletions.
8 changes: 7 additions & 1 deletion lib/rufus/scheduler/cronline.rb
Expand Up @@ -36,6 +36,7 @@ class CronLine
# The string used for creating this cronline instance.
#
attr_reader :original
attr_reader :original_timezone

attr_reader :seconds
attr_reader :minutes
Expand All @@ -53,10 +54,15 @@ def initialize(line)
) unless line.is_a?(String)

@original = line
@original_timezone = nil

items = line.split

@timezone = items.pop if ZoTime.is_timezone?(items.last)
#@timezone = items.pop if ZoTime.is_timezone?(items.last)
if tz = ZoTime.get_tzone(item.last)
@timezone = tz.name
@original_timezone = items.pop
end

fail ArgumentError.new(
"not a valid cronline : '#{line}'"
Expand Down
175 changes: 0 additions & 175 deletions lib/rufus/scheduler/zones.rb

This file was deleted.

0 comments on commit fbd75ef

Please sign in to comment.