Skip to content

Instantly share code, notes, and snippets.

@3735943886
Last active August 4, 2023 17:27
Show Gist options
  • Save 3735943886/d8a4da8f943ea49224aee87da41cfa88 to your computer and use it in GitHub Desktop.
Save 3735943886/d8a4da8f943ea49224aee87da41cfa88 to your computer and use it in GitHub Desktop.
Get Eorzea Time
#include <stdio.h>
#include <time.h>
void GetEorzeaTime(int *eHour, int *eMin)
{
/* Get current time */
time_t currentTime;
time(&currentTime);
/* Convert to Eorzea time */
/* In Eorzea, 12 game minutes = 35 real seconds */
if (eMin) *eMin = (currentTime * 12 / 35) % 60;
if (eHour) *eHour = (currentTime * 12 / 35 / 60) % 24;
return;
}
/*
void main()
{
int hours, minutes;
GetEorzeaTime(&hours, &minutes);
printf("Eorzea Time %02d:%02d", hours, minutes);
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment