Date and time zone #3

Closed
xdenser opened this Issue Jun 8, 2012 · 1 comment

Comments

Projects
None yet
2 participants

xdenser commented Jun 8, 2012

var con =  new fb.Database('127.0.0.1', 3050, cfg.db, cfg.user, cfg.password,function(){
    con.execute("select Date 'today' from rdb$database", function(rs){
         console.log(rs.data.length);
         console.log(rs.data[0][0]);
    });    
});

outputs

[xdenser@localhost node-firebird]# node date-issue.js
1
Sat, 09 Jun 2012 00:00:00 GMT

while

[xdenser@localhost node-firebird]# date -u
Fri Jun  8 22:23:17 UTC 2012

Same applies to timestamp and time fields.

xdenser commented Jun 8, 2012

That better illustrates problem

 var con =  new fb.Database('127.0.0.1', 3050, cfg.db, cfg.user, cfg.password,function(){
     con.execute("select TIMESTAMP 'now' from rdb$database", function(rs){
          console.log(rs.data[0][0]);
          console.log(new Date());
     });    
 });

outputs:

[xdenser@localhost node-firebird]# node date-issue.js
Sat, 09 Jun 2012 01:32:23 GMT
Fri, 08 Jun 2012 22:32:23 GMT

@hgourvest hgourvest closed this in 6913a50 Jun 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment