💾 Archived View for hacktivis.me › cgi-src › mdate.c captured on 2021-12-05 at 23:47:19.

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

#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;
}