| p5-Palm documentation | Contained in the p5-Palm distribution. |
Palm - Palm OS utility functions
my @parts = localtime( palm2epoch($palmtime) );
Converts a PalmOS timestamp to a Unix Epoch time. Note, however, that PalmOS time is in the timezone of the Palm itself while Epoch is defined to be in the GMT timezone. Further conversion may be necessary.
my $palmtime = epoch2palm( time() );
Converts Unix epoch time to Palm OS time.
$PDB->Write( mkpdbname($PDB->{name}) );
Convert a PalmOS database name to a 7-bit ASCII representation. Native Palm database names can be found in ISO-8859-1 encoding. This encoding isn't going to generate the most portable of filenames and, in particular, ColdSync databases use this representation.
The source is in Github:
http://github.com/briandfoy/p5-Palm/tree/master
Alessandro Zummo, <a.zummo@towertech.it>
Currently maintained by brian d foy, <bdfoy@cpan.org>
Palm::PDB(3)
| p5-Palm documentation | Contained in the p5-Palm distribution. |
# Palm.pm # # Perl module for reading and writing Palm databases (both PDB and PRC). # # Copyright (C) 1999, 2000, Andrew Arensburger. # You may distribute this file under the terms of the Artistic # License, as specified in the README file. use strict; use warnings; package Palm; use vars qw( $VERSION ); # One liner, to allow MakeMaker to work. $VERSION = '1.012';
my $EPOCH_1904 = 2082844800; # Difference between Palm's # epoch (Jan. 1, 1904) and # Unix's epoch (Jan. 1, 1970), # in seconds.
sub palm2epoch { return $_[0] - $EPOCH_1904; }
sub epoch2palm { return $_[0] + $EPOCH_1904; }
sub mkpdbname { my $name = shift; $name =~ s![%/\x00-\x19\x7f-\xff]!sprintf("%%%02X",ord($&))!ge; return $name; }