[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coldsync-hackers] p5-Palm Datebook.pm
There's an error in p5-Palm/Palm/Datebook.pm when creating new records:
>>>>>>>>>>>>>
# By default, the new record is an untimed event that occurs
# today.
($retval->{day},
$retval->{month},
$retval->{year}) = (localtime(time))[3, 4, 5];
<<<<<<<<<<<<
But localtime() returns year-1900 and month-1. I'd write it this way:
>>>>>>>>>>>>
@$retval{"day","month","year"}=(localtime)[3..5];
$retval->{month}+=1;
$retval->{year}+=1900;
<<<<<<<<<<<<
I also question whether setting a 10 minute default alarm is wise
(especially since not mentioned in the docs), which say:
Creates a new Datebook record, with blank values for all of the fields.
Thanks,
JD
--
This message was sent through the coldsync-hackers mailing list. To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body. For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.