pcouderc has asked for the wisdom of the Perl Monks concerning the following question:
I get :my $dbh= DBI->connect( q!dbi:Pg:dbname=asterisk;host=www.ibm.fr!, 'asterisk','secret') or die $DBI::errstr; my $cursor = $dbh->prepare( "SELECT * FROM asterisk_cdr where id=48000;"); $cursor->execute; my @row; if ( @row = $cursor->fetchrow ) { my $Date = DateTime::Format::Pg->parse_timestamp_with_time_zone($row[1]) ; my $Date3= $Date->clone()->set_time_zone('floating')->set_time_zone( 'Europ +e/Paris' ); print "$Date==$Date3",$Date3->time_zone_long_name(), ' ',$Date3->hms,$Date->hms,"\n"; }
I have done many other trials but I do not success to print 23:55 !!!2017-06-10T21:55:00==2017-06-10T21:55:00Europe/Paris 21:55:002 +1:55:00
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Lost in DateTime !
by haukex (Archbishop) on Jun 13, 2017 at 20:40 UTC | |
by Discipulus (Canon) on Jun 13, 2017 at 20:58 UTC | |
by haukex (Archbishop) on Jun 13, 2017 at 21:10 UTC | |
by pcouderc (Monk) on Jun 13, 2017 at 21:25 UTC | |
by haukex (Archbishop) on Jun 13, 2017 at 21:50 UTC | |
by pcouderc (Monk) on Jun 14, 2017 at 06:12 UTC | |
by huck (Prior) on Jun 14, 2017 at 07:33 UTC | |
by poj (Abbot) on Jun 14, 2017 at 17:53 UTC | |
by pcouderc (Monk) on Jun 13, 2017 at 21:43 UTC | |
Re: Lost in DateTime !
by 1nickt (Canon) on Jun 13, 2017 at 23:35 UTC | |
by pcouderc (Monk) on Jun 14, 2017 at 06:16 UTC |