crawfordr has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
The following date calculation is being run from a unix script. It is calculating the incorrect date. We use the calculation to determine a date fro our billing system. The code has been calculating the date correctly until today when it was run to calculate a January 2008 date.
Here is the code:
It is currently producing 071201 and it should be calculating 080101.
The following date calculation is being run from a unix script. It is calculating the incorrect date. We use the calculation to determine a date fro our billing system. The code has been calculating the date correctly until today when it was run to calculate a January 2008 date.
Here is the code:
billdate=`perl -MPOSIX -e 'print strftime( "%y%m", localtime( time + 1 +123200 ) )'`01
It is currently producing 071201 and it should be calculating 080101.
We need this relatively quickly. I would very much appreciate any help whatsoever. You guys are great.
Thanks again
Edit: g0n - code tags and formatting
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: A date calculation
by FunkyMonk (Chancellor) on Dec 18, 2007 at 21:47 UTC | |
by crawfordr (Acolyte) on Dec 18, 2007 at 22:10 UTC | |
by jrsimmon (Hermit) on Dec 18, 2007 at 22:30 UTC | |
by vlademonkey (Pilgrim) on Dec 18, 2007 at 22:32 UTC | |
by FunkyMonk (Chancellor) on Dec 18, 2007 at 22:33 UTC | |
by Anonymous Monk on Dec 19, 2007 at 11:19 UTC | |
Re: A date calculation
by moritz (Cardinal) on Dec 18, 2007 at 21:56 UTC | |
Re: A date calculation
by aquarium (Curate) on Dec 19, 2007 at 01:45 UTC | |
by pfaut (Priest) on Dec 19, 2007 at 02:16 UTC | |
by aquarium (Curate) on Dec 19, 2007 at 02:30 UTC | |
by pfaut (Priest) on Dec 19, 2007 at 03:16 UTC | |
Re: A date calculation
by chrism01 (Friar) on Dec 19, 2007 at 01:15 UTC | |
Re: A date calculation
by poolpi (Hermit) on Dec 19, 2007 at 09:37 UTC |
Back to
Seekers of Perl Wisdom