add TDirectory option to any2many.

This commit is contained in:
2025-10-03 15:42:44 +02:00
parent fbfce99790
commit 1e9b82f1c2
6 changed files with 136 additions and 56 deletions

View File

@@ -582,6 +582,58 @@ PRawRunData::~PRawRunData()
fRedGreenOffset.clear();
}
//--------------------------------------------------------------------------
// CalcStartDateTime (public)
//--------------------------------------------------------------------------
/**
* <p>Calculate time_t of the present fStartDate and fStartTime.
*
* @param ok, true if time_t conversion has been successful
*
* @return time_t of the present fStartDate and fStartTime
*/
const time_t PRawRunData::CalcStartDateTime(bool &ok)
{
time_t dt=0;
ok = true;
struct tm tmStruct;
char date_time[256];
snprintf(date_time, sizeof(date_time), "%s %s", fStartDate.Data(), fStartTime.Data());
char *p_char = strptime(date_time, "%Y-%m-%d %H:%M:%S", &tmStruct);
if (*p_char != '\0') {
ok = false;
return dt;
}
dt = mktime(&tmStruct);
return dt;
}
//--------------------------------------------------------------------------
// CalcStopDateTime (public)
//--------------------------------------------------------------------------
/**
* <p>Calculate time_t of the present fStopDate and fStopTime.
*
* @param ok, true if time_t conversion has been successful
*
* @return time_t of the present fStopDate and fStopTime
*/
const time_t PRawRunData::CalcStopDateTime(bool &ok)
{
time_t dt=0;
ok = true;
struct tm tmStruct;
char date_time[256];
snprintf(date_time, sizeof(date_time), "%s %s", fStopDate.Data(), fStopTime.Data());
char *p_char = strptime(date_time, "%Y-%m-%d %H:%M:%S", &tmStruct);
if (*p_char != '\0') {
ok = false;
return dt;
}
dt = mktime(&tmStruct);
return dt;
}
//--------------------------------------------------------------------------
// GetTemperature (public)
//--------------------------------------------------------------------------