You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when I use a timestamp with timezone in dateadd, the result is unknown. The Firebird version is '4.0.4'.
my $dbh = DBI->connect( "dbi:Firebird:dbname=$db", $user, $passwd ) or die DBI->errstr;
my $table = 'test_table_unix_seconds';
my $col = 'sec';
$dbh->do( "RECREATE TABLE $table ($col INT)" );
$dbh->do( "INSERT INTO $table ($col) VALUES(86400)" );
my $sth = $dbh->prepare( "SELECT $col, dateadd(SECOND,$col,TIMESTAMP '1970-01-01') FROM $table" );
$sth->execute();
$sth->dump_results;
# 86400, 'Fr 02 Jan 1970 00:00:00 CET'
$sth = $dbh->prepare( "SELECT $col, dateadd(SECOND,$col,TIMESTAMP '1970-01-01 UTC') at time zone 'CET' as ts FROM $table" );
$sth->execute();
$sth->dump_results;
# 86400, '** unknown **'
It works using isql:
#SQL> SELECT sec, dateadd(SECOND,sec,TIMESTAMP '1970-01-01 UTC') at time zone 'CET' as ts FROM test_table_unix_seconds;
#
# SEC TS
#============ =========================================================
# 86400 1970-01-02 01:00:00.0000 CET
The text was updated successfully, but these errors were encountered:
Hi, when I use a timestamp with timezone in dateadd, the result is unknown. The Firebird version is '4.0.4'.
It works using
isql
:The text was updated successfully, but these errors were encountered: