My problem is this: I would like to start a new file with the filename having the date appended onto it, at 0000 hours GMT. I am trying to use _gmtime64. I am a begining C++ coder.
void BotActvityLogging(char* filepath, char* ActivityLog)
{
string str;
//The asctime function converts a time stored as a structure to a character string.
//The _tm value is usually obtained from a call to gmtime or localtime.
//Both functions can be used to fill in a tm structure, as defined in TIME.H.
string strGMT = (asctime_s (char* buffer, size_t 64, conststruct tm *_gmtime64(const_time64_t *_Time))); // size_t: Result of sizeof operator.
str.append (strGMT, 4, 5);
fstream filestr;
filestr.open (filepath, fstream::in | fstream::out | fstream::app);
if (str != str.append)
{
str = str.append
}
filestr<<ActivityLog<<str<<endl; // Need GMT Date appended here.
}
I know there are bugs with it but I cannot figure out what they are. Can someone put be back on the path to righteousness?