Skip to content

Commit

Permalink
bugfix: getlocaltime would return UTC time, instead of local time
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Jan 3, 2025
1 parent 72e2e4f commit b9c5e60
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/osdep/fsdb_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,13 @@ TCHAR* fsdb_create_unique_nname(a_inode* base, const TCHAR* suggestion)
}

// Get local time in secs, starting from 01.01.1970
uae_u32 getlocaltime(void)
uae_u32 getlocaltime()
{
return time(NULL); // ToDo: convert UTC to local time...
time_t rawtime;
struct tm* timeinfo;

time(&rawtime);
timeinfo = localtime(&rawtime);

return mktime(timeinfo);
}

0 comments on commit b9c5e60

Please sign in to comment.