Skip to content

Commit

Permalink
smart: ISO time formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rurban committed Apr 5, 2024
1 parent 049a43a commit 425e2b5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/smart.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ unsigned int MINLEN = 1,
//#define SIGMA 256 // constant alphabet size
#define MG (1024 * 1024) // costant for 1 MB size
#define MAXTIME 999.00
// now iso, was %Y:%m:%d %H:%M:%S
#define TIME_FORMAT "%Y-%m-%d %H:%M:%S"

#ifndef BINDIR
#define BINDIR "bin"
Expand Down Expand Up @@ -673,7 +675,7 @@ int main(int argc, const char *argv[]) {
struct tm *tm_info;
time(&date_timer);
tm_info = localtime(&date_timer);
strftime(time_format, 26, "%Y:%m:%d %H:%M:%S", tm_info);
strftime(time_format, 26, TIME_FORMAT, tm_info);
printf("\tExperimental tests started on %s\n", time_format);

printf("\tStarting experimental tests with code %s\n", expcode);
Expand Down Expand Up @@ -710,7 +712,7 @@ int main(int argc, const char *argv[]) {
struct tm *tm_info;
time(&date_timer);
tm_info = localtime(&date_timer);
strftime(time_format, 26, "%Y:%m:%d %H:%M:%S", tm_info);
strftime(time_format, 26, TIME_FORMAT, tm_info);
printf("\tExperimental tests started on %s\n", time_format);

run_setting(list_of_filenames[k], T, n, alpha, FREQ, VOLTE, options,
Expand Down Expand Up @@ -743,7 +745,7 @@ int main(int argc, const char *argv[]) {
struct tm *tm_info;
time(&date_timer);
tm_info = localtime(&date_timer);
strftime(time_format, 26, "%Y:%m:%d %H:%M:%S", tm_info);
strftime(time_format, 26, TIME_FORMAT, tm_info);
printf("\tExperimental tests started on %s\n", time_format);

run_setting(SETTING_BUFFER[sett], T, n, alpha, FREQ, VOLTE, options,
Expand Down

0 comments on commit 425e2b5

Please sign in to comment.