Skip to content

Instantly share code, notes, and snippets.

@wgm89
Created September 17, 2013 15:44
Show Gist options
  • Select an option

  • Save wgm89/6596172 to your computer and use it in GitHub Desktop.

Select an option

Save wgm89/6596172 to your computer and use it in GitHub Desktop.
test.c
#include "stdio.h"
#include "time.h"
#include "string.h"
void main(){
int * month;
int no;
time_t timer;
char timebuf[128];
struct tm * current;
time(&timer);
current = localtime(&timer);
/*
current->tm_hour = 23;
current->tm_min = 0;
current->tm_sec = 0;
*/
//strftime(timebuf,128,"%Y-%m-%d",current);
no = mktime(current);
printf("%d",no);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment