dynamic_time_zone 0.4.0 → 0.5.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 495fbed668267a932e1719e9877a9450c404baaadc892a5d7c36c8d9fcfef45c
|
4
|
+
data.tar.gz: 708f132cbc5da54b49d9793f44f2c03f3c128c66a403d9ecf4f2c6c02f91c5c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41c199f3d118993457c9886c25740048a5171392376c32be79707faf12b6cfcd2904475029fc92322c6cb75e84d3e8a2a0564f80e11b5557025698d37d46ff9d
|
7
|
+
data.tar.gz: 2235ee587f21a9dd92c64024e7c0cb87cd693fef9705dbda86ed3465c9ea099bb84152a84742ff33e89f7b9f506b320f5227b762c6fc63d47a43aafae5fcf9e1
|
@@ -9,7 +9,11 @@ module TimeWithZonePatch
|
|
9
9
|
alias_method :getlocal, :localtime
|
10
10
|
|
11
11
|
def formatted_offset(*args)
|
12
|
-
|
12
|
+
actual_formatted_offset = super
|
13
|
+
return actual_formatted_offset unless using_dynamic_time_zone?
|
14
|
+
|
15
|
+
seconds_in_24_hours = 24 * 60 * 60
|
16
|
+
utc_offset.abs > seconds_in_24_hours ? '+0000' : actual_formatted_offset
|
13
17
|
end
|
14
18
|
|
15
19
|
def using_dynamic_time_zone?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamic_time_zone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Appfolio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02
|
11
|
+
date: 2022-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tzinfo
|
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
|
-
rubygems_version: 3.
|
81
|
+
rubygems_version: 3.0.9
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: Dynamically set the offset from UTC from timezone identifier
|