> Couple of things you will have to do. The time value in your PDB will be > big endian, and the PC is little endian, so you need to do some byte > swapping on the value from your .pdb to take care of the endianess. Next, > the PC stores time since 1970, and Palm since 1904, so subtract the > difference from your palm time that has been byte swapped. That difference > is > 2082844800 seconds. > > Now use some VB function to turn the seconds since 1970 into a time. Don't > forget to account for time zone and daylight savings. > > In 'C', I take the palm time as start_time, then do the following: > > longend(start_time); // swap the bytes4 > start_time -= 2082844800; // subtract the diff from 1970-1904 > start_time += tz_daylight_ofset; // account for daylight savings and time > zone > fprintf(ofile_p, "%s", ctime(<ime)); > > This now prints the date day year and time to a file I have opened. You > will have to do slightly different for VB as I am not sure of the functions, > but the concept is the same.
not quite. VB does not support unsigned longs. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
