Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I print the three variables before each call and the results (in seconds) after each call. Out of 1323 lines of data, 13 calls return invalid results. One example is a call using 1,1,1,30,8,104 that returns 2613361 seconds instead of 1096520461 seconds. All of the bad returns have a $pmon value of 8 and $pyear value of 104. Only the first call using a date in September 2004 is returned correctly. All other bad returns are for different dates within the same year and month. Incorrect values are consistant as far as I can tell. IE.. first call for 8/30/04 returns 1096520461. Second and third calls return 2613361. Other calls of similiar dates spread over 3 years in different months appear correct. Months are correct starting with 0, etc. This bug appeared after a system & perl version upgrade. Code worked for years without error on older version of Perl & HP/UX. We are currently running the latest version of PERL suppored by HP. Any ideas?use time::local; $pepoch=timelocal(1,1,1,$pday,$pmon,$pyear);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: time::local
by bart (Canon) on May 07, 2005 at 19:40 UTC | |
by Anonymous Monk on May 09, 2005 at 18:44 UTC | |
|
Re: time::local
by gube (Parson) on May 07, 2005 at 04:27 UTC | |
|
Re: time::local
by bluto (Curate) on May 09, 2005 at 16:26 UTC |