For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > September 2005 > [PEAR] Calendar









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [PEAR] Calendar
Gerard Bowe

2005-09-29, 7:56 am

I have just started using PEAR::Calendar, with the examples provided.

Everything works ok, but have a problem with the "attach a payload"
script (20.php), specifically the $events array;

If I change the format from;

$events[] = array(
'start' => $cal->cE->dateToStamp(2005, 9, 5, 10),
'end' => $cal->cE->dateToStamp(2005, 9, 10, 23, 59),
'desc' => 'Holidays!'
);

to (using just a mysql date field)

$events[] = array(
'start' => $cal->cE->dateToStamp(2005, 9, 5),
'end' => $cal->cE->dateToStamp(2005, 9, 10),
'desc' => 'Holidays!'
);


it calculates the dates wrong, ie instead of from 5/9/2005 to 10/9/2005,
it returns values for 4/9/2005 to 9/9/2005 (out by 1 day).

Any help would be appreciated.

thanks
Ger
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com