zuora_connect 2.0.60k → 2.0.60l

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: fe61d354796bd1cf1935f2787db0611bb2858393767db78230efb191cf64eabc
4
- data.tar.gz: c5b22daf266f3cc696c1a85ac46e7b4242d75a59f094f2103edb1fa0da729df2
3
+ metadata.gz: 00f68595c6354e9924c2e73bdb81246bdc858874f49830f94111e0d46b6e8298
4
+ data.tar.gz: 1b01b3c05190970c9ad92c461f64b89787b790f3e2ffb6394831ccce425e0d1a
5
5
  SHA512:
6
- metadata.gz: 04b0bf5d380361c58279910595d0967fde34c00b05db703d2c4dda02a8205487eb8b0fd3c8bfc44d0c0997854cfacca9585c778e96000e938a19b8ee6604271c
7
- data.tar.gz: 510d4eb2cd734f1082f887ff3924ce580658d4419929ee12db35acec17338785b8e9ecb64588307f3a6fe26adb29a8ed45c04df51a2964f1be9480880c2f2813
6
+ metadata.gz: e58fc8cd5b36a2be218afab342507a78acb5221001cdc712e61a7e80ad0615797ed42c7ae413d4d5dc179d14784e91eb621ea5be9466a45e904ed97bd5996076
7
+ data.tar.gz: df3730519a5b2b1e8b3778866bd6ac59255633666522fe7ec8522e6815a1c87d5aba89fd733ec1eaecf6caeccf74fde010ea40a9d882b20d6fe2cfc4f1ee46a2
@@ -260,9 +260,16 @@ module ZuoraConnect
260
260
 
261
261
  if self.user_timezone.present?
262
262
  # connect instance which has a custom timezone
263
- if !self.auto_deployed? && self.task_data.dig('user_settings', 'timezone') != self.user_timezone
263
+ if !self.auto_deployed? && (
264
+ ActiveSupport::TimeZone[self.task_data.dig('user_settings', 'timezone') || '']&.utc_offset !=
265
+ ActiveSupport::TimeZone[self.user_timezone]&.utc_offset
266
+ )
264
267
  if self.environment == 'Production'
265
- ZuoraConnect.logger.error('Instance and user timezones are different', app_instance_id: self.id)
268
+ ZuoraConnect.logger.error(
269
+ "Instance and user timezones are different. User has '#{self.user_timezone}' and " \
270
+ "instance has '#{self.task_data.dig('user_settings', 'timezone')}'",
271
+ app_instance_id: self.id
272
+ )
266
273
  end
267
274
  self.user_timezone = nil
268
275
  Time.zone = self.timezone
@@ -132,6 +132,9 @@ module ZuoraConnect
132
132
  if locale.include?("-")
133
133
  locale = locale.split("-").first
134
134
  retry
135
+ elsif locale != session["#{@appinstance.id}::user::language"]
136
+ locale = session["#{@appinstance.id}::user::language"]
137
+ retry
135
138
  end
136
139
  ZuoraConnect.logger.error(ex) if !ZuoraConnect::AppInstance::IGNORED_LOCALS.include?(ex.locale.to_s.downcase)
137
140
  end
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "2.0.60k"
2
+ VERSION = "2.0.60l"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.60k
4
+ version: 2.0.60l
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-03 00:00:00.000000000 Z
11
+ date: 2020-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apartment