Skip to content

Instantly share code, notes, and snippets.

@Veejay
Created April 26, 2012 21:54
Show Gist options
  • Save Veejay/2503499 to your computer and use it in GitHub Desktop.
Save Veejay/2503499 to your computer and use it in GitHub Desktop.
char* format_time(time_t t)
{
char formatted_time[64];
struct tm *ts;
strftime(formatted_time, sizeof formatted_time, "%Y-%m-%d %H:%M:%S", ts);
return formatted_time;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment