Update 2024-02-14 07:51 OpenBSD/amd64-x13
This commit is contained in:
13
.bin/OLD/t2i/timetest.c
Normal file
13
.bin/OLD/t2i/timetest.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
char str[] = "07.10.2022";
|
||||
struct tm timeptr;
|
||||
strptime(str, "%d.%m.%Y", &timeptr);
|
||||
printf("%d%d%d\n", timeptr.tm_year + 1900, timeptr.tm_mon + 1, timeptr.tm_mday);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user