sequel_pg 1.12.4 → 1.12.5

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: b6fd331562b3092789479e69cb8de82bf5593014d0e9d58efb58ae0ac0cc519a
4
- data.tar.gz: d0d29de191faa1093a18a9ccd7ea3bc4e51b4bb1c8ed207e464d3b749846199a
3
+ metadata.gz: 609ef32bd9eb0fe13dad508682adc477415124359e04f1aebbf5e54cdaaf4630
4
+ data.tar.gz: 31d2bebfa20c348daf4a0e03bee7df3f727b0306fa3f0987bbcfdaa050f2a234
5
5
  SHA512:
6
- metadata.gz: fe7358271c4e788614111f42db5507fb251af87a853b867920871d6e85c1679f752453742d4add9078841655416317c855e2f6fe2d403611b915b5e1d4960852
7
- data.tar.gz: 761b2fdc14026cf8e9c76bc6865e9b8ab0449b28a3fd6fdea10df616b1ffbb18971ff1cdb1ceb3b7bdc3b077ba4e608697e32ce00b6ee769692a45e3e6a5a941
6
+ metadata.gz: 9a1ba95aa91fa7e521b3b6991b716fec37722faca0d2a658a7743e4fdd5e631b789f3c6da667b1b6f84159ab0ce2091d72b753b1c1d7fb08a357ddf645e9b81d
7
+ data.tar.gz: 97bacb9be53e6781fcdfb60abbd934b8aa269554495559a64c2d223a0dde3f78a8ca64a32dc04898bec69c753656ffcad1005913fe0b5fc34597e4ab01f3267c
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ === 1.12.5 (2020-03-23)
2
+
3
+ * Fix offset calculation for timestamptz types when datetime_class is DateTime and using local application timezone (jeremyevans)
4
+
5
+ * Fix wrong method call when parsing timestamptz types when datetime_class is Time and using utc database timezone and local application timezone (jeremyevans)
6
+
1
7
  === 1.12.4 (2020-01-02)
2
8
 
3
9
  * Work with pg 1.2.1+ (jeremyevans)
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2018 Jeremy Evans
1
+ Copyright (c) 2010-2020 Jeremy Evans
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to
@@ -1,4 +1,4 @@
1
- #define SEQUEL_PG_VERSION_INTEGER 11204
1
+ #define SEQUEL_PG_VERSION_INTEGER 11205
2
2
 
3
3
  #include <string.h>
4
4
  #include <stdio.h>
@@ -631,7 +631,7 @@ static VALUE spg_timestamp(const char *s, VALUE self, size_t length, int tz) {
631
631
  if (tz & SPG_APP_UTC) {
632
632
  dt = rb_funcall(dt, spg_id_utc, 0);
633
633
  } else if (tz & SPG_APP_LOCAL) {
634
- dt = rb_funcall(dt, spg_id_local, 0);
634
+ dt = rb_funcall(dt, spg_id_localtime, 0);
635
635
  }
636
636
 
637
637
  return dt;
@@ -703,8 +703,8 @@ static VALUE spg_timestamp(const char *s, VALUE self, size_t length, int tz) {
703
703
  SPG_DT_ADD_USEC
704
704
 
705
705
  if (tz & SPG_APP_LOCAL) {
706
- utc_offset = NUM2INT(rb_funcall(rb_funcall(rb_cTime, spg_id_new, 0), spg_id_utc_offset, 0))/SPG_SECONDS_PER_DAY;
707
- dt = rb_funcall(dt, spg_id_new_offset, 1, rb_float_new(utc_offset));
706
+ offset_fraction = NUM2INT(rb_funcall(rb_funcall(rb_cTime, spg_id_local, 6, INT2NUM(year), INT2NUM(month), INT2NUM(day), INT2NUM(hour), INT2NUM(min), INT2NUM(sec)), spg_id_utc_offset, 0))/SPG_SECONDS_PER_DAY;
707
+ dt = rb_funcall(dt, spg_id_new_offset, 1, rb_float_new(offset_fraction));
708
708
  } else if (tz & SPG_APP_UTC) {
709
709
  dt = rb_funcall(dt, spg_id_new_offset, 1, INT2NUM(0));
710
710
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel_pg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.4
4
+ version: 1.12.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-02 00:00:00.000000000 Z
11
+ date: 2020-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg