in reply to Re: Date::Manip problem when creating arrays
in thread Date::Manip problem when creating arrays

aplogies - its a balance between editing the output to highlight the problem, and enough of the output to show that there is a problem. All the output appears fine, except the last days of March
2011032100:00:00 ..... 2011032600:00:00 2011032700:00:00 2011032801:00:00 2011032901:00:00 2011033001:00:00 it goes from 2011-03-27 00:00:00 to 2011-03-28 01:00:00 same on 29th and same on 30th and misses out completely 31st

Replies are listed 'Best First'.
Re^3: Date::Manip problem when creating arrays
by Corion (Patriarch) on Aug 02, 2011 at 06:43 UTC

    Have you read the documentation on Date::Manip::Recur? It explains how the recurrence pattern works. If you use it as you did, you get exact distances, and it seems that, somewhat naturally, Date::Manip declares a "day" to be "24 hours".

    It seems from the documentation that the following could work:

    0:0:0:1*0:0:0

    ... but to be sure, I recommend you actually read the documentation, now that you are aware of the fact that not all "days" are 24 hours long.

      I'll confirm that the recurrence (0:0:0:1*0:0:0) DOES work (assuming that what you are after is a list of ALL dates at time 00:00:00).

      Corion is correct about the source of the confusion... since a day is not always 24 hours long, applying a recurrence like this can give unexpected results. The only way to get around this is to make sure that the recurrence has an (*) in it which explicitly sets values in the date(s) returned.