hackapp_gem 0.1.4 → 0.1.5
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.
- checksums.yaml +4 -4
- data/lib/hackapp_gem.rb +11 -10
- data/lib/hackapp_gem/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ac576d9545f10455ae73632634fc1bb84d01e40d
|
|
4
|
+
data.tar.gz: 9d4f4a2ceba478e8252ab65086b65b551ed80bef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dedc6864508ebd0429f30b4f1579cea62af37b86da84dd306ba69ce061a78bf6bb718ef7351e340daa93fb231bedff2ac9e1d9e0fd919173113cccf1d207aa77
|
|
7
|
+
data.tar.gz: f9637c256d74e72f6cbc484948c7c2cd9165673a3f88d5575ecbc3ddd62df7423f3fcc13e979f4ee1b0133bb00c0586faf05eb0ffb98738364f665b0308d7244
|
data/lib/hackapp_gem.rb
CHANGED
|
@@ -2,6 +2,17 @@ require "hackapp_gem/version"
|
|
|
2
2
|
|
|
3
3
|
module HackappGem
|
|
4
4
|
class ActiveSupport::TimeWithZone
|
|
5
|
+
# times in database are eastern time to add 5 hours to all
|
|
6
|
+
def to_UTC
|
|
7
|
+
begin
|
|
8
|
+
shift_to_UTC = 5
|
|
9
|
+
self.to_datetime.advance(:hours => shift_to_UTC).to_datetime
|
|
10
|
+
rescue Exception => e
|
|
11
|
+
puts "Unrecognizeable timezone: #{e}"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# adjust according to what you want to view
|
|
5
16
|
def change_timezone(options)
|
|
6
17
|
zones = {"eastern" => -5,
|
|
7
18
|
"central" => -6,
|
|
@@ -19,15 +30,5 @@ module HackappGem
|
|
|
19
30
|
puts "Unrecognizeable timezone: #{e}"
|
|
20
31
|
end
|
|
21
32
|
end
|
|
22
|
-
|
|
23
|
-
# times in database are eastern time to add 5 hours to all
|
|
24
|
-
def to_UTC
|
|
25
|
-
begin
|
|
26
|
-
shift_to_UTC = 5
|
|
27
|
-
self.to_datetime.advance(:hours => shift_to_UTC).to_datetime
|
|
28
|
-
rescue Exception => e
|
|
29
|
-
puts "Unrecognizeable timezone: #{e}"
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
33
|
end
|
|
33
34
|
end
|
data/lib/hackapp_gem/version.rb
CHANGED