in reply to How can I add 1 hour to the current time

use DateTime; my $dt = DateTime->now( time_zone => 'local' ); $dt->add( hours => 1 ); say $dt->strftime('%Y-%m-%d %H:%M:%S');

Replies are listed 'Best First'.
Re^2: How can I add 1 hour to the current time
by BrowserUk (Patriarch) on Aug 20, 2011 at 08:51 UTC
    say $dt->ymd;

    Shouldn't that be: say $dt->hms;


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Fixed, thanks