in reply to Anyone know how to get DateTime::Format::W3CDTF, or DateTimeX::Web to print localtime?

G'day Chris,

Including other bits of information I picked up in this thread, consider this:

#!/usr/bin/env perl -l use strict; use warnings; use Time::Piece; print localtime->strftime('%Y-%m-%dT%H:%M:%S');

Output:

2013-11-27T19:31:52

-- Ken

  • Comment on Re: Anyone know how to get DateTime::Format::W3CDTF, or DateTimeX::Web to print localtime?
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: Anyone know how to get DateTime::Format::W3CDTF, or DateTimeX::Web to print localtime?
by taint (Chaplain) on Nov 27, 2013 at 14:02 UTC
    Good call, kcott.
    And wastes less ACSII too.
    Thanks. :)

    --Chris

    #!/usr/bin/perl -Tw
    use Perl::Always or die;
    my $perl_version = (5.12.5);
    print $perl_version;