CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate: Date manipulation - dates prior to year 2000 giving probelms ...: Edit Log

New User

Jan 4, 2012, 1:49 AM

Views: 1642
Date manipulation - dates prior to year 2000 giving probelms ...

I am running perl 5.8.5 on linux and wrote the following script:
use strict;
use warnings;
use Date::Parse;
use Date::Format;
my $start = "11/01/2000";
my $stop = "11/02/2000";
my $diff = str2time($stop) - str2time($start);
printf "diff btw %s and %s is %d secs is = %d days\n", $start, $stop, $diff, $diff/86400;

if i replace the year to any before Y 1963 (e.g. $start="11/01/1962";), the script breaks down.

The script was working before fine. There were some changes the system guys made in my profile and now none of the other users can run it either.

I believe that there is a system change but don't know how to find it.

(This post was edited by eagleZ on Jan 4, 2012, 2:36 AM)

Edit Log:
Post edited by eagleZ (New User) on Jan 4, 2012, 2:36 AM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives