[ic] time tag with adjust in February bug?
mike at perusion.com
Mon Apr 1 12:00:14 UTC 2013
Quoting Peter (peter at pajamian.dhs.org):
> On 04/01/2013 04:36 PM, Mike Heins wrote:
> >There is no "month". 1m is one minute, the "onth" makes no difference.
> >And you can't do addition and subtraction by combining terms...
> Actually there is, added in May of 2009. Check the adjust_time()
> function in Utils.pm
> >This is April Fool's on European time, no?
> Nope, even though it was April 1st in New Zealand at the time.
I am afraid I was not aware of this transition in code, I had thought
that all of this type of code used Vend::Config::time_to_seconds().
One is, of course, at the mercy of the mktime() function, and it is
not at all clear what happens when you alter multiple members. March
and February are particularly picky in that area, as Feb. 30 is not
something that can be represented.
The only way to do this properly would be to run mktime after
each atom of adjustment, generating a new @times array, and then
apply the next. Even then, you may not get what you think you
are going to get.
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.253.4194 <mike at perusion.com>
People who want to share their religious views with you
almost never want you to share yours with them. -- Dave Barry
More information about the interchange-users