sequel_pg 1.6.9-x86-mswin32-60 → 1.6.10-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ === 1.6.10 (2014-07-11)
2
+
3
+ * Work correctly when the database timezone is not a named timezone but the application timezone is (jeremyevans)
4
+
1
5
  === 1.6.9 (2014-03-05)
2
6
 
3
7
  * When using the streaming extension, automatically use streaming to implement paging in Dataset#paged_each (jeremyevans)
data/README.rdoc CHANGED
@@ -107,6 +107,11 @@ you should modify the maximum supported number of columns via:
107
107
 
108
108
  gem install sequel_pg -- --with-cflags=\"-DSPG_MAX_FIELDS=512\"
109
109
 
110
+ Make sure the pg_config binary is in your PATH so the installation
111
+ can find the PostgreSQL shared library and header files. Alternatively,
112
+ you can use the POSTGRES_LIB and POSTGRES_INCLUDE environment
113
+ variables to specify the shared library and header directories.
114
+
110
115
  == Running the specs
111
116
 
112
117
  sequel_pg doesn't ship with it's own specs. It's designed to
@@ -309,6 +309,17 @@ static VALUE spg_timestamp(const char *s, VALUE self) {
309
309
  }
310
310
  }
311
311
 
312
+ rtz = rb_funcall(spg_Sequel, spg_id_application_timezone, 0);
313
+ if (rtz != Qnil) {
314
+ if (rtz == spg_sym_local) {
315
+ tz += SPG_APP_LOCAL;
316
+ } else if (rtz == spg_sym_utc) {
317
+ tz += SPG_APP_UTC;
318
+ } else {
319
+ return rb_funcall(db, spg_id_to_application_timestamp, 1, rb_str_new2(s));
320
+ }
321
+ }
322
+
312
323
  if (0 != strchr(s, '.')) {
313
324
  tokens = sscanf(s, "%d-%2d-%2d %2d:%2d:%2d.%n%d%n%c%02d:%02d",
314
325
  &year, &month, &day, &hour, &min, &sec,
@@ -337,14 +348,7 @@ static VALUE spg_timestamp(const char *s, VALUE self) {
337
348
  offset_minute *= -1;
338
349
  }
339
350
 
340
- /* Get values of datetime_class, database_timezone, and application_timezone */
341
351
  dtc = rb_funcall(spg_Sequel, spg_id_datetime_class, 0);
342
- rtz = rb_funcall(spg_Sequel, spg_id_application_timezone, 0);
343
- if (rtz == spg_sym_local) {
344
- tz += SPG_APP_LOCAL;
345
- } else if (rtz == spg_sym_utc) {
346
- tz += SPG_APP_UTC;
347
- }
348
352
 
349
353
  if (dtc == rb_cTime) {
350
354
  if (offset_sign) {
data/lib/1.8/sequel_pg.so CHANGED
Binary file
data/lib/1.9/sequel_pg.so CHANGED
Binary file
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel_pg
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 6
9
- - 9
10
- version: 1.6.9
9
+ - 10
10
+ version: 1.6.10
11
11
  platform: x86-mswin32-60
12
12
  authors:
13
13
  - Jeremy Evans
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2014-03-05 00:00:00 Z
18
+ date: 2014-07-11 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: pg