Skip to content

Commit 4cfa071

Browse files
wybren1971tdaede
authored andcommitted
Added real time and not the compiletime of fluxengine
1 parent 21afb9a commit 4cfa071

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/imagewriter/imdimagewriter.cc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#include <algorithm>
1111
#include <iostream>
1212
#include <fstream>
13+
#include <chrono>
14+
#include <ctime>
1315

1416
/*
1517
* Where to get the type of encoding FM or MFM? Now solved with options in proto config
@@ -168,14 +170,17 @@ class ImdImageWriter : public ImageWriter
168170

169171

170172
//Give the user a option to give a comment in the IMD file for archive purposes.
173+
auto start = std::chrono::system_clock::now();
174+
std::time_t time = std::chrono::system_clock::to_time_t(start);
175+
171176
std::string comment = _config.imd().comment();
172177
if (comment.size() == 0)
173178
{
174179
comment = LABEL ;
175180
comment.append(" date: ");
176-
comment.append(__DATE__);
177-
comment.append(" time: ");
178-
comment.append(__TIME__);
181+
comment.append(std::ctime(&time));
182+
// comment.append(" time: ");
183+
// comment.append(__TIME__);
179184
} else
180185
{
181186
comment.insert(0,"IMD ");

0 commit comments

Comments
 (0)