origin 1.0.0 → 1.0.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.
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@
6
6
 
7
7
  ### Resolved Issues
8
8
 
9
- ## 1.0.1 (branch: 1.0.0-stable)
9
+ ## 1.0.1
10
10
 
11
11
  ### Resolved Issues
12
+
13
+ * \#38 Fixed issues around UTC time conversion of dates and date times:
14
+
15
+ `DateTimes` already in UTC are not converted to UTC again.
16
+
17
+ `Dates` properly convert directly to UTC from numeric values.
@@ -14,7 +14,11 @@ module Origin
14
14
  #
15
15
  # @since 1.0.0
16
16
  def __evolve_time__
17
- ::Time.local(year, month, day, hour, min, sec).utc
17
+ if utc?
18
+ ::Time.utc(year, month, day, hour, min, sec)
19
+ else
20
+ ::Time.local(year, month, day, hour, min, sec).utc
21
+ end
18
22
  end
19
23
 
20
24
  module ClassMethods
@@ -15,7 +15,7 @@ module Origin
15
15
  #
16
16
  # @since 1.0.0
17
17
  def __evolve_date__
18
- time = ::Time.at(self)
18
+ time = ::Time.at(self).utc
19
19
  ::Time.utc(time.year, time.month, time.day, 0, 0, 0, 0)
20
20
  end
21
21
 
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Origin
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.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-06-05 00:00:00.000000000 Z
12
+ date: 2012-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -145,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  segments:
147
147
  - 0
148
- hash: -778932131334871158
148
+ hash: -3400773899600660622
149
149
  required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  none: false
151
151
  requirements: