This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/gmtime_s.c

16 lines
321 B
C

#define __STDC_WANT_LIB_EXT1__ 1
#include <stdio.h>
#include <time.h>
void main()
{
time_t time_of_day;
auto char buf[26];
auto struct tm tmbuf;
time_of_day = time( NULL );
gmtime_s( &time_of_day, &tmbuf );
asctime_s( buf, sizeof( buf ), &tmbuf );
printf( "It is now: %.24s GMT\n", buf );
}