ReactOS  0.4.15-dev-506-ga3ec01c
mktime.c File Reference
#include <stdio.h>
#include <time.h>
Include dependency graph for mktime.c:

Go to the source code of this file.

Functions

int main (void)
 

Variables

struct tm time_str
 
char daybuf [20]
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 9 of file mktime.c.

10 {
11  printf("Testing mktime() by asking\n");
12  printf("What day of the week is July 4, 2001?\n");
13 
14  time_str.tm_year = 2001 - 1900;
15  time_str.tm_mon = 7 - 1;
16  time_str.tm_mday = 4;
17  time_str.tm_hour = 0;
18  time_str.tm_min = 0;
19  time_str.tm_sec = 1;
20  time_str.tm_isdst = -1;
21  if (mktime(&time_str) == -1)
22  (void)puts("-unknown-");
23  else {
24  (void)strftime(daybuf, sizeof(daybuf), "%A", &time_str);
25  (void)puts(daybuf);
26  }
27  return 0;
28 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
size_t CDECL strftime(char *str, size_t max, const char *format, const struct tm *mstm)
Definition: strftime.c:293
char daybuf[20]
Definition: mktime.c:7
int puts(const char *string)
Definition: crtsupp.c:23
struct tm time_str
Definition: mktime.c:5
time_t mktime(struct tm *ptm)
Definition: mktime.c:121
#define printf
Definition: config.h:203

Variable Documentation

◆ daybuf

char daybuf[20]

Definition at line 7 of file mktime.c.

Referenced by main().

◆ time_str

struct tm time_str

Definition at line 5 of file mktime.c.

Referenced by fill_datetime_information(), and main().