void Time_ConvertSecondsToHMS(long seconds, char *buffer) {
  long hours   = seconds / 3600;
  long minutes = (seconds % 3600) / 60;
  long secs    = seconds % 60;

  snprintf(buffer, 9, "%02ld:%02ld:%02ld", hours, minutes, secs);
}

void Time_UnixToHMS(long long unix_time, char *out) {
  time_t t = (time_t)unix_time;
  struct tm tm_info;

  localtime_s(&tm_info, &t);  // thread-safe
  strftime(out, 20, "%d/%m/%Y %H:%M:%S", &tm_info);
}
