activerecord-jdbc-alt-adapter 60.1.0-java → 60.2.0-java

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: f83a5e387ec9999cc730027498dec97428cfee7b3c3edcc6845a779c01c4272a
4
- data.tar.gz: 3a7e9ce2b8e6e968bdb21f4ac72a9f498e3226c414ec4b003e4b463dffc74062
3
+ metadata.gz: 6ba45dfdd067960db619e03cb0bc979ad3d932d78f632748bd4b7c48f9fb8ca1
4
+ data.tar.gz: 3b5defceb44cc698b7cc9cd965e3cb30531c396b1212c5bc37753ed9625a3505
5
5
  SHA512:
6
- metadata.gz: f71a50d80a6f01837512d87a52ef32ec69a245e1927086cc0736efa35835c57710652f1ad6c294039422ad69eea20d308b48df02ba8d43e7c1acea4de7358ee0
7
- data.tar.gz: 732cde407f1c4ff98bb7e528ea183dd483e2b8edf8a475f60f445dc7580fd8e8d3374ca248b5d7eb2f02b1c596efdeed5ce7dc393563425565657ca6302d6145
6
+ metadata.gz: 52f1292397f116ed23a55cfbd44baa445f1096f01f64a1500fa3b44e2fa701e3c14fd6d2076e4aa332bbabd764e6a917dcd7931fbc6284050460dcbfe2d863b8
7
+ data.tar.gz: 7d175792f1eebee0f393d998451bd5966cd55626532527d6cfb58fcf6a98fd2081a72dc78f2438e14446bd6b10efdfa5c8b02fa083af9a780e8f22f629dc04a6
data/.nvimlog ADDED
File without changes
data/README.md CHANGED
@@ -10,10 +10,10 @@ stable of this adapter and Rails
10
10
 
11
11
  | Gem Version | Rails Version | min JRuby |
12
12
  | ----------- | ------------- | --------- |
13
- | 50.6.1 | 5.0.7.2 | 9.1.x |
14
- | 51.6.1 | 5.1.7 | 9.1.x |
15
- | 52.5.1 | 5.2.4.1 | 9.1.x |
16
- | 60.0.0 | 6.0.2 | 9.2.9 |
13
+ | 50.7.0 | 5.0.7 | 9.1.x |
14
+ | 51.7.0 | 5.1.7 | 9.1.x |
15
+ | 52.6.0 | 5.2.4 | 9.1.x |
16
+ | 60.1.0 | 6.0.3 | 9.2.9 |
17
17
 
18
18
  This adapter passes most of the Rails tests (ActiveRecord tests) with the
19
19
  exception of some test that are not compatible with the SQL Server. To run
@@ -28,8 +28,8 @@ Add the following to your `Gemfile`:
28
28
  ```ruby
29
29
  platforms :jruby do
30
30
  # Use jdbc as the database for Active Record
31
- gem 'activerecord-jdbc-alt-adapter', '~> 60.0.0'
32
- gem 'jdbc-mssql', '~> 0.7.0'
31
+ gem 'activerecord-jdbc-alt-adapter', '~> 60.1.0'
32
+ gem 'jdbc-mssql', '~> 0.9.0'
33
33
  end
34
34
  ```
35
35
 
Binary file
@@ -1,3 +1,3 @@
1
1
  module ArJdbc
2
- VERSION = '60.1.0'
2
+ VERSION = '60.2.0'
3
3
  end
@@ -387,7 +387,20 @@ public class PostgreSQLRubyJdbcConnection extends arjdbc.jdbc.RubyJdbcConnection
387
387
  RubyDate rubyDate = (RubyDate) value;
388
388
  DateTime dt = rubyDate.getDateTime();
389
389
  // pgjdbc needs adjustment for default JVM timezone
390
- statement.setDate(index, new Date(dt.getMillis() - TZ_DEFAULT.getOffset(dt.getMillis())));
390
+ //
391
+ // If the date is a day when Daylight savings starts (2am changed to 3am),
392
+ // And we are in a positive GMT timezone (Australia/Melbourne)
393
+ // Then removing milliseconds equal to the TimeZone (+11 GMT),
394
+ // will result in the date being the previous day 23:00, because of the missing hour.
395
+ // So we check if the date after the shift is outside of daylight time and remove an hours worth of milliseconds.
396
+ final long dateMillis = dt.getMillis();
397
+ long offset = TZ_DEFAULT.getOffset(dt.getMillis());
398
+ if (TZ_DEFAULT.inDaylightTime(new Date(dt.getMillis())) && !TZ_DEFAULT.inDaylightTime(new Date(dateMillis - offset))) {
399
+ offset -= 3600000; // 1 hour
400
+ }
401
+ Date utcShiftedDate = new Date(dateMillis - offset);
402
+
403
+ statement.setDate(index, utcShiftedDate);
391
404
  return;
392
405
  }
393
406
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-jdbc-alt-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 60.1.0
4
+ version: 60.2.0
5
5
  platform: java
6
6
  authors:
7
7
  - Nick Sieger, Ola Bini, Karol Bucek and JRuby contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-17 00:00:00.000000000 Z
11
+ date: 2021-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -17,8 +17,8 @@ dependencies:
17
17
  - !ruby/object:Gem::Version
18
18
  version: 6.0.0
19
19
  name: activerecord
20
- type: :runtime
21
20
  prerelease: false
21
+ type: :runtime
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
@@ -38,6 +38,7 @@ extensions: []
38
38
  extra_rdoc_files: []
39
39
  files:
40
40
  - ".gitignore"
41
+ - ".nvimlog"
41
42
  - ".travis.yml"
42
43
  - ".yardopts"
43
44
  - CONTRIBUTING.md
@@ -264,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
265
  - !ruby/object:Gem::Version
265
266
  version: '0'
266
267
  requirements: []
267
- rubygems_version: 3.0.6
268
+ rubygems_version: 3.1.6
268
269
  signing_key:
269
270
  specification_version: 4
270
271
  summary: ActiveRecord JDBC adapter, for use within JRuby on Rails and SQL Server