ice_cube 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,9 +39,14 @@ module IceCube
39
39
  wrapper = TimeUtil::TimeWrapper.new(time, dst_adjust)
40
40
  wrapper.add(type, fwd)
41
41
  wrapper.clear_below(type)
42
- if wrapper.to_time == time
43
- wrapper.add(:sec, wrapper.to_time.utc_offset * 2)
42
+ # Move over DST if blocked, no adjustments
43
+ if wrapper.to_time <= time
44
+ wrapper = TimeUtil::TimeWrapper.new(wrapper.to_time, false)
45
+ until wrapper.to_time > time
46
+ wrapper.add(:min, 10) # smallest interval
47
+ end
44
48
  end
49
+ # And then get the correct time out
45
50
  time = wrapper.to_time
46
51
  end
47
52
  false
@@ -12,7 +12,7 @@ module IceCube
12
12
 
13
13
  def until(time)
14
14
  @until = time
15
- replace_validations_for(:until, [Validation.new(time)])
15
+ replace_validations_for(:until, time.nil? ? nil : [Validation.new(time)])
16
16
  self
17
17
  end
18
18
 
@@ -1,5 +1,5 @@
1
1
  module IceCube
2
2
 
3
- VERSION = '0.9.0'
3
+ VERSION = '0.9.1'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ice_cube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-12 00:00:00.000000000 Z
12
+ date: 2012-10-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec