in reply to Re^3: Anyone know how to get DateTime::Format::W3CDTF, or DateTimeX::Web to print localtime? (what was I thinking, learning moments)
in thread Anyone know how to get DateTime::Format::W3CDTF, or DateTimeX::Web to print localtime?

Thanks for your thoughtful response.

Actually, I'm suffering a massive headache. The worst part is; I wasn't drinking. So I'm suffering without having the benefit of having had a great time. :(

Now having been given a little focus (the example above). It occurred to me, that given I almost always use
POSIX qw(strftime);
for any of my Date/Time related stuff. I could have simply done:

use POSIX qw(strftime); my $w3cstring = strftime "%FT%H:%I:%S", localtime; print $w3cstring;
Which would have returned the equivalent:
2013-11-26T14:02:48
In fact better; as I wasn't looking for the TZ. Which is appended, using the example provided earlier in this thread.

Thanks again, for the thoughtful response.

--Chris

#!/usr/bin/perl -Tw
use Perl::Always or die;
my $perl_version = (5.12.5);
print $perl_version;
  • Comment on Re^4: Anyone know how to get DateTime::Format::W3CDTF, or DateTimeX::Web to print localtime? (what was I thinking, learning moments)
  • Select or Download Code

Replies are listed 'Best First'.
Re^5: Anyone know how to get DateTime::Format::W3CDTF, or DateTimeX::Web to print localtime? (what was I thinking, learning moments)
by Anonymous Monk on Nov 27, 2013 at 03:03 UTC
    POSIX is great, but the microsoft strftime implementation doesn't have %F, maybe its important to you :)
      LOL.

      He imported all that stuff from UNIX to make Windows NT. But left out the %Fing %F
      %Figures.
      :)

      --Chris

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