SDRTrunk .mbe File Replay Initial Commit; #298

This commit is contained in:
lwvmobile
2025-06-22 15:16:19 -04:00
parent 3a1d393a0f
commit 8a30115398
6 changed files with 645 additions and 30 deletions

View File

@@ -79,3 +79,20 @@ char * getDateN(time_t t)
return curr;
}
//get HHmmss timestamp no colon (file operations)
char * getTimeF(time_t t)
{
char * curr = calloc(7, sizeof(char));
struct tm * ptm = localtime(& t);
sprintf(curr,"%02d%02d%02d", ptm->tm_hour, ptm->tm_min, ptm->tm_sec);
return curr;
}
//get YYYYMMDD without hyphen (file operations)
char * getDateF(time_t t)
{
char * curr = calloc(25, sizeof(char));
struct tm * ptm = localtime(& t);
sprintf(curr,"%04d%02d%02d", ptm->tm_year+1900, ptm->tm_mon+1, ptm->tm_mday);
return curr;
}