rollups 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0fa306f943a2bad69a6515e6735374dd1ee4e927e6bd01dfb3b5dc33cd59aa0
4
- data.tar.gz: 8ae83c58992563b5c7b7474c29df74ef45d5450eac7ce4be4280e7ff36712435
3
+ metadata.gz: 0e5c6fead572e785077c4ab0afd4e627dd152580a5f7d06dfaec55cca368892f
4
+ data.tar.gz: c48a223298b96a5404fda29192f6453e92f6f00fe10b53db5dfc633fe46696c8
5
5
  SHA512:
6
- metadata.gz: d59d9c091e78af3808e494ff89d9dc0432528a8b69b9c413111a994e7d1fef2718797e23090c885307be2932ea021834fcb25298b173477d9fcad5696148a537
7
- data.tar.gz: ed3bae975a14d4790044097200984c8dd48c28a50023a0e6326c1dd709c117f35f399a8491125fb9eb9c5cf432519e370fc4cdc5c40ec5b4c5da82e0fdf47290
6
+ metadata.gz: d831822c3b6c4b70d119a2bcd704ae579d8f444cf7ffce388842aa5fc7841d0435669a203b9c54a55629088dfb553ead3288a6282d9f4ea5d5b9b9f737222086
7
+ data.tar.gz: af477019c11b0a75548d4181e7cf693d75487565ab99dd4b469bc3d748902d0cb802f2f868509cc71eb914e37796a435b013bbcc42a82a3189f9be0779b43c19
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.2 (2024-02-09)
2
+
3
+ - Fixed incorrect rollups with `time_zone: false` when `Rollup.time_zone` has a negative UTC offset
4
+
1
5
  ## 0.3.1 (2023-09-20)
2
6
 
3
7
  - Added support for Trilogy
@@ -43,7 +43,7 @@ class Rollup
43
43
  raise ArgumentError, "Cannot use range and current together" if range && !current.nil?
44
44
 
45
45
  current = true if current.nil?
46
- time_zone ||= Rollup.time_zone
46
+ time_zone = Rollup.time_zone if time_zone.nil?
47
47
 
48
48
  gd_options = {
49
49
  current: current
@@ -68,7 +68,14 @@ class Rollup
68
68
  # for MySQL on Ubuntu 18.04 (and likely other platforms)
69
69
  if max_time.is_a?(String)
70
70
  utc = ActiveSupport::TimeZone["Etc/UTC"]
71
- max_time = Utils.date_interval?(interval) ? max_time.to_date : utc.parse(max_time).in_time_zone(time_zone)
71
+ max_time =
72
+ if Utils.date_interval?(interval)
73
+ max_time.to_date
74
+ else
75
+ t = utc.parse(max_time)
76
+ t = t.in_time_zone(time_zone) if time_zone
77
+ t
78
+ end
72
79
  end
73
80
 
74
81
  # aligns perfectly if time zone doesn't change
@@ -1,5 +1,5 @@
1
1
  class Rollup
2
2
  # not used in gemspec to avoid superclass mismatch
3
3
  # be sure to update there as well
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollups
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-21 00:00:00.000000000 Z
11
+ date: 2024-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.4.10
78
+ rubygems_version: 3.5.3
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Rollup time-series data in Rails