Jim Gibson writes:
> On Oct 31, 2018, at 1:29 PM, Martin McCormick
> wrote:
> > my $t1 = Time::Piece->strptime("$obtime[1], %d %b %Y %H:%M:%S %z”);
>
> strptime is a method with two arguments: string to be parsed, format to
> be used for parsing. You have one argument: a double-quoted string
Sam writes:
>
>
>
> None of your arguments are right. For one, you are using the '%D' flag
> which is the same as saying '%m/%d/%y'
>
>
> This works fine from a quick command line test:
>
> perl -e 'use Time::Piece; $t = "30 Oct
ng but a miss is the same as close so I can't tell if I am
getting warm.
Thanks for any ideas.
Martin McCormick
None of your arguments are right. For one, you are using the '%D' flag
which is the same as saying '%m/%d/%y'
This works fine from a quick command l
On Oct 31, 2018, at 1:29 PM, Martin McCormick wrote:
>
>
> I'd like to say that it's working but not yet. There seems to be
> nothing wrong with the string now.
>
> my $t1 = Time::Piece->strptime("$obtime[1], %d %b %Y %H:%M:%S %z”);
strptime is a method with two arguments: string to be parse
("$obtime[1], %d %b %Y %H:%M:%S %z");
Still the parse error.
Right now, I do have both
use Time::Local;
use Time::Piece;
in the program and Time::Piece is supposed to replace many of the
functions of Time::Local. If I comment out Time::Local, a
reference to gntime breaks.
On 10/30/18 11:24 PM, Martin McCormick wrote:
I can not seem to send Time::Piece any syntax it likes.
The file I am reading sends a time stamp that should
conform to RFC822 date stamps. An example of a stamp follows:
main::(lwx:204):my @obtime = split( /\,+/, $data-
etting warm.
Thanks for any ideas.
Martin McCormick
Code follows:
#!/usr/bin/perl -w
use strict;
use warnings::unused;
use Data::Dumper;
use XML::Simple;
use File::Basename;
use Cwd;
use File::stat;
use Time::Local;
use Time::Piece;
my $homedir = "/tmp";
my @t = localtime(ti