jruby-rfc2445 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/jtime.rb +3 -2
  2. data/spec/rfc2445_spec.rb +1 -1
  3. metadata +1 -1
data/lib/jtime.rb CHANGED
@@ -100,10 +100,11 @@ class JTime
100
100
  self
101
101
  end
102
102
 
103
- # Returns a Ruby Time object
103
+ # Returns a Ruby Time object, since Ruby Time object has limited time zone support,
104
+ # it always return a UTC time
104
105
  def to_time
105
106
  millis = @time.getMillis
106
- Time.at(millis / 1000, millis % 1000 * 1000)
107
+ Time.at(millis / 1000, millis % 1000 * 1000).utc
107
108
  end
108
109
 
109
110
  # Returns the underlying Java DateTime object
data/spec/rfc2445_spec.rb CHANGED
@@ -72,7 +72,7 @@ describe JTime do
72
72
  end
73
73
 
74
74
  it "should return a Ruby time object" do
75
- now = Time.now
75
+ now = Time.now.utc
76
76
  time = JTime.new
77
77
  rtime = time.to_time
78
78
  rtime.should be_instance_of(Time)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby-rfc2445
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerry Luk