time_zone_converter 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/time_zone_converter.rb +3 -3
- data/lib/time_zone_converter/cli.rb +1 -1
- data/lib/time_zone_converter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b623ee8173d1ac3cdaa2d25edc40252957d4e6aeb486f2cb53a5c16a9f23d66d
|
4
|
+
data.tar.gz: '07840b75654fa44888669345c7201d80d35906d26b27d6aa14234fcc2c51a697'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7559776e8e93dd310b8caca8346792b76a60bafc1af688a928568adb694642e5c354b858be441da976bf55e9704eb85d0c5bb70ea56d410af04d21c827154d66
|
7
|
+
data.tar.gz: 8c03b4b3cbd8ee002ffb1208a4a2992b1ae77c32f11cd3b9b82f2cff6b11957715cb5136f4ad2461a2e3e2d1459b1f9dfe43b2cceb6a98af62cf75b8d663dc57
|
data/Gemfile.lock
CHANGED
data/lib/time_zone_converter.rb
CHANGED
@@ -52,10 +52,10 @@ module TimeZoneConverter
|
|
52
52
|
|
53
53
|
ISO_TIME = /\A(\d\d):(\d\d)\z/
|
54
54
|
|
55
|
-
def self.string_to_time(
|
56
|
-
return unless
|
55
|
+
def self.string_to_time(time, time_zone)
|
56
|
+
return time unless time.is_a? String
|
57
57
|
|
58
|
-
if
|
58
|
+
if time =~ ISO_TIME
|
59
59
|
zone = ActiveSupport::TimeZone[time_zone]
|
60
60
|
current_time = Time.new.utc
|
61
61
|
|