time_palmtime2dlp3
Palmos time-conversion functions
Part of time_dlp2palmtime(3).
Usage
#include <time.h>
#include <palm.h>
#include <pconn/pconn.h>
udword
time_dlp2palmtime(const struct dlp_time *dlpt);
time_t
time_dlp2time_t(const struct dlp_time *dlpt);
void
time_palmtime2dlp(const udword palmt, struct dlp_time *dlpt);
void
time_time_t2dlp(const time_t t, struct dlp_time *dlpt);
Library
libpconn
Overview
Palms use two different representations of time in different contexts. The first, Palm-style time_t, is an integer indicating the number of seconds elapsed since Jan. 1, 1904 (the Palm epoch).
The second representation is a structure listing the individual time fields, similar to a struct tm :
struct dlp_time
{
uword year;
ubyte month;
ubyte day;
ubyte hour;
ubyte minute;
ubyte second;
};
(Note that year is the four-digit year number, e.g., 2001.)
time_dlp2palmtime takes a dlp_time and converts it to a Palm-style time_t.
time_dlp2time_t takes a dlp_time and converts it to a Unix-style time_t.
time_palmtime2dlp takes a Palm-style time_t and converts it to a dlp_time structure, writing the results to dlpt.
time_time_t2dlp takes a Unix-style time_t and converts it to a dlp_time structure, writing the results to dlpt.
Return value
time_dlp2palmtime returns a Palm-style time_t.
time_dlp2time_t returns a Unix-style time_t.
Releases
Unchanged in 2 releases since Debian 3.1 (Sarge).