Created
September 22, 2018 13:27
-
-
Save bDrwx/8608e1d24a445596b698aed44af4306f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <time.h> | |
| int main() | |
| { | |
| time_t timer; | |
| char buffer[26]; | |
| struct tm* tm_info; | |
| time(&timer); | |
| tm_info = localtime(&timer); | |
| strftime(buffer, 26, "%Y-%m-%d %H:%M:%S", tm_info); | |
| puts(buffer); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment