Normalizing tm structure past 2038

From: Stu (beefstu350_at_hotmail.com)
Date: 10/31/03


Date: 31 Oct 2003 08:29:36 -0800

Does any body have any "C" code, which there willing to share, that
can normalize a tm structure, which goes past the 2038 EPOCH.

For example,

I have the following tm stucture, which is set to the EPOCH
/* Tue Jan 19 03:14:07 2038 */

epoch = {
    tm_sec = 7
    tm_min = 14
    tm_hour = 3
    tm_mday = 19
    tm_mon = 0
    tm_year = 138
    tm_wday = 0
    tm_yday = 19
    tm_isdst = 0
}

I want to be able to increment epoch.tm_mday by "n" # of days and than
pass it to a function like strftime() (see below) and have the
correct date print out.

if (strftime (buf, sizeof(buf), "%Y.%m.%d %H:%M:%S", epoch) > 0)
        printf ("Retention Expiration = %s\n", buf );

Thanks in advance for all the answer this post.