[DGD] Re: time fkun

Thorsten Lockert tholo at SigmaSoft.COM
Sun Jul 12 03:54:19 CEST 1998


> If this program:
> 
>     #include <time.h>
>     main() { time_t t; time(&t); printf("%s", ctime(&t)); }
> 
> shows the current time when executed, then it is a dynamic library
> problem: recompile DGD.  Otherwise it's a system configuration problem.

Actually, there is a problem with the above code on some systems.  One
standard says that a call to tzset() should be made right off the bat,
something like:

#include <stdio.h>
#include <time.h>

int
main()
{
    time_t t;

    tzset();
    time(&t);
    printf("%s", ctime(&t));
    return 0;
}
--
Thorsten Lockert   | postmaster at sigmasoft.com | Universe, n.:
4929 Dickinson Dr. | hostmaster at sigmasoft.com |         The problem.
San Jose, CA 95111 | tholo at sigmasoft.com      |



List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list