in reply to Dumb question...probably...

Are you sure you're passing valid values for each of those parameters?

Replies are listed 'Best First'.
Re^2: Dumb question...probably...
by kepler (Scribe) on Aug 20, 2014 at 19:52 UTC
    Here's the code

    use DateTime; use DateTime::TimeZone; #For testing $zone = "America/Chicago"; $date = "8/5/1967"; $time = "8:30:00"; my $tz = DateTime::TimeZone->new( name => $zone ); ($day,$month,$year) =~ split(/\//,$date); ($hour,$minutes,$seconds) =~ split(/\:/,$time); my $dt = DateTime->new( year => $year, month => $month, day => $day, hour => $hour, minute => $minutes, second => $seconds, );
    What am I missing here...? Regards, Kepler
      ($hour,$minutes,$seconds) =~ split(/\:/,$time); print join "|", ($hour,$minutes,$seconds); -- ||

      "=~" ne "="; :P --> use strict; use warnings;

      Oh crap... the =~ in split... :/

        This is the fourth time you've been told to use warnings; use strict; (1, 2, 3). use warnings; use strict; is also the first item on the Basic debugging checklist. The second item on the Basic debugging checklist, printing your values, would have shown you that your original assumption "the values are not empty" was wrong.

        A reply falls below the community's threshold of quality. You may see it by logging in.