mdate.c (415B)
- #define _POSIX_C_SOURCE 200809L
- #include <time.h> /* time */
- #include <stdio.h> /* printf */
- // 3600*24.5
- #define cycle 88200
- int
- main(void) {
- time_t now = time(NULL);
- time_t date_now = now / cycle;
- time_t time_now = now % cycle;
- printf("20 text/gemini; charset=utf-8\r\n");
- printf("On a 24.5h cycle it is now: %lX,%05lX\n", date_now, time_now);
- printf("=> /cgi-src/mdate.c Source code\n");
- return 0;
- }