=================================================================== RCS file: /cvs/palm/Palm-Keyring/lib/Palm/Keyring.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- palm/Palm-Keyring/lib/Palm/Keyring.pm 2007/01/31 04:29:08 1.20 +++ palm/Palm-Keyring/lib/Palm/Keyring.pm 2007/01/31 05:32:20 1.21 @@ -1,6 +1,6 @@ package Palm::Keyring; -# $RedRiver: Keyring.pm,v 1.19 2007/01/31 04:17:15 andrew Exp $ +# $RedRiver: Keyring.pm,v 1.20 2007/01/31 04:29:08 andrew Exp $ # # Perl class for dealing with Keyring for Palm OS databases. # @@ -126,11 +126,15 @@ $data->{'password'} ||= $EMPTY; $data->{'notes'} ||= $EMPTY; - my %Modified; - my ($day, $month, $year) = (localtime)[3,4,5]; - $year -= 4; - $month++; + my ($day, $month, $year); + # XXX the 0 here is a placeholder for $record_has_changed. + if ( 0 || ! $data->{'lastchange'}) { + ($day, $month, $year) = (localtime)[3,4,5]; + $year -= 4; + $month++; + } + my $p = $day | ($month << 5) | ($year << 9); my $packeddate = pack 'n', $p; @@ -460,7 +464,7 @@ lastchange => { year => 107, # years since 1900 month => 0, # 0-11, 0 = January, 11 = December - day => 30, # 1-31, same as l + day => 30, # 1-31, same as localtime }, };