Look at the definition of MPAK_HEADER
// MPAK_HEADER structure. The OS places parsed MPAK header info into this // structure, and uses this structure to build and MPAK. typedef struct { long Sender; // sender MAN number long Destination; // Addressee MAN number int MpakType; // PSUBCOM mpak type, 0 for non PSUBCOM int HPID; // MPAK HPID for HPDATA Mpaks int Flags; // MPAK flags component TIME Timestamp; // parsed Mobitex Time Stamp long lTime; // MPAK raw Mobitex Time Stamp int TrafficState; // MPAK traffic state } MPAK_HEADER;We can easily see that this is not the same as the raw Mobitex MPAK format. One of the different things is TIME Timestamp.
Let's check the definition of the structure TIME, it is in Rim.h of the SDK.
/* Time Type */ typedef struct // USED FOR GET/SET DATE and TIME { BYTE second; BYTE minute; BYTE hour; BYTE date; BYTE month; BYTE day; // day of week, Sun=0, Mon=1, ..., Sat=6 WORD year; BYTE TimeZone; } TIME;This structure clearly gives more useful information for the data/time than the original number from raw Mobitex network.
I use this as a way to synchonize the time of the Rim devices with the server: the custom server sends the Rim devices an empty MPAK, and the Rim device application will use RimSetDate( &m_header.Timestamp ) and RimSetTime( &m_header.Timestamp ) to set the correct date and time.