Share this page

# Example: gmtime

The following example gets the time as a time_t structure and converts it, using gmtime, to a tm structure in Coordinated Universal Time.

        #include <time.h>

        time_t t;
        struct tm * gmt;
        time(&t);
        gmt = (struct tm *)gmtime(&t);
        lr_message ("Coordinated universal time:\t\t%s", asctime(gmt));

    Example: Output:
    Coordinated universal time:        Sun Apr 21 15:31:06 2002

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: