Patch level : 12.0 822
Files correlati : mr0.exe Commento : Aggiunta ora e minuti al salvataggio del file di rilevazione dei terminalini per aumentare la precisione
This commit is contained in:
parent
f417fee58f
commit
8135c22137
@ -644,9 +644,13 @@ void TRilprod_mask::load_prod_file(const char* nomefile, bool savefile, bool onl
|
|||||||
TString filemask(dest);
|
TString filemask(dest);
|
||||||
TString_array arr;
|
TString_array arr;
|
||||||
TDate filedate(TODAY);
|
TDate filedate(TODAY);
|
||||||
|
time_t the_time = time(nullptr);
|
||||||
|
struct tm local_time {};
|
||||||
|
localtime_s(&local_time, &the_time);
|
||||||
|
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
||||||
filemask << format("pr%02d%02d*.dat", filedate.month(), filedate.day());
|
filemask << format("pr%04d%02d%02d%02d%02d*.dat", filedate.year(), filedate.month(), filedate.day(), local_time.tm_hour, local_time.tm_min);
|
||||||
list_files(filemask, arr);
|
list_files(filemask, arr);
|
||||||
|
|
||||||
const int items = arr.items();
|
const int items = arr.items();
|
||||||
@ -657,7 +661,7 @@ void TRilprod_mask::load_prod_file(const char* nomefile, bool savefile, bool onl
|
|||||||
}
|
}
|
||||||
cnt++;
|
cnt++;
|
||||||
|
|
||||||
dest << format("pr%02d%02d%02d.dat", filedate.month(), filedate.day(), cnt);
|
dest << format("pr%04d%02d%02d%02d%02d%02d.dat", filedate.year(), filedate.month(), filedate.day(), local_time.tm_hour, local_time.tm_min, cnt);
|
||||||
if (fcopy(nomefile, dest))
|
if (fcopy(nomefile, dest))
|
||||||
remove_file(nomefile);
|
remove_file(nomefile);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user