mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-19 20:27:26 -05:00
Remove Colon (:) from mbe output files (hh:mm:ss);
This commit is contained in:
@@ -17,19 +17,19 @@
|
|||||||
|
|
||||||
#include "dsd.h"
|
#include "dsd.h"
|
||||||
|
|
||||||
time_t nowF;
|
//fix from YorgosTheodorakis fork -- https://github.com/YorgosTheodorakis/dsd-fme/commit/7884ee555521a887d388152b3b1f11f20433a94b
|
||||||
char * getTimeF(void) //get pretty hh:mm:ss timestamp
|
char * getTimeF(void) //get pretty hhmmss timestamp
|
||||||
{
|
{
|
||||||
|
char * curr = (char *) malloc(9);
|
||||||
time_t t = time(NULL);
|
time_t t = time(NULL);
|
||||||
|
struct tm * ptm = localtime(& t);
|
||||||
char * curr;
|
sprintf(
|
||||||
char * stamp = asctime(localtime( & t));
|
curr,
|
||||||
|
"%02d%02d%02d",
|
||||||
curr = strtok(stamp, " ");
|
ptm->tm_hour,
|
||||||
curr = strtok(NULL, " ");
|
ptm->tm_min,
|
||||||
curr = strtok(NULL, " ");
|
ptm->tm_sec
|
||||||
curr = strtok(NULL, " ");
|
);
|
||||||
|
|
||||||
return curr;
|
return curr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ char * getDateF(void) {
|
|||||||
time_t t;
|
time_t t;
|
||||||
t = time(NULL);
|
t = time(NULL);
|
||||||
to = localtime( & t);
|
to = localtime( & t);
|
||||||
strftime(datename, sizeof(datename), "%Y-%m-%d", to);
|
strftime(datename, sizeof(datename), "%Y%m%d", to);
|
||||||
curr2 = strtok(datename, " ");
|
curr2 = strtok(datename, " ");
|
||||||
return curr2;
|
return curr2;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user