hey guys,
I can't believe I'm having this much trouble doing this. I'm pulling a UNIX_TIMESTAMP from MySQL and all I want to do is add a certain interval to that date then spit out the new date. Right now we only support weekly intervals in our app.

My original code did this fine:

eventDate = date_from_db();
while(eventDate < today) {
        eventDate += (7 * 86400);
}
print eventDate;

But! Then the time changed and now the calculations are off by 1 hour.

What, in perl, can I use to accomplish this? Later on we'd like to support bi-weekly, daily and monthly intervals.

This was so easy to do in php:
  eventDate = strtotime("+1 week", eventDateFromDB);

Thanks in advance for any help.

-Matthew

Reply via email to