<commit_before>#include "console\console.h"
#include "network\server.h"
#include <time.h>

#include <fstream>

using namespace console;
using namespace network;

#include <iostream>

int main(int argc, char** argv)
{
	QApplication QApp(argc, argv);

	Console* console = new Console();

	Server* server = new Server();
	server->Initialise(console);

	server->Run();

	time_t t = time(0);
	struct tm now;
	localtime_s(&now, &t);

	QString year = QString::number(now.tm_year + 1900);

	QString month = QString::number(now.tm_mon);
	if (month.size() < 2)
		month = "0" + month;

	QString day = QString::number(now.tm_mday);
	if (day.size() < 2)
		day = "0" + day;

	QString hour = QString::number(now.tm_hour);
	if (hour.size() < 2)
		hour = "0" + hour;

	QString min = QString::number(now.tm_min);
	if (min.size() < 2)
		min = "0" + min;

	QString sec = QString::number(now.tm_sec);
	if (sec.size() < 2)
		sec = "0" + sec;

	QString timeStamp = year + month + day + "@" + hour + min + sec;

	std::ofstream plainLogFile;
	plainLogFile.open(std::string("log") + timeStamp.toUtf8().constData() + ".txt");
	plainLogFile << console->GetQtConsole()->logging_view->toPlainText().toUtf8().constData();
	plainLogFile.close();

	std::ofstream htmlLogFile;
	htmlLogFile.open(std::string("log") + timeStamp.toUtf8().constData() + ".html");
	htmlLogFile << console->GetQtConsole()->logging_view->toHtml().toUtf8().constData();
	htmlLogFile.close();

	return 0;
}<commit_msg>Fix bug in the console logging scheme where the month would be off by 1.<commit_after>#include "console\console.h"
#include "network\server.h"
#include <time.h>

#include <fstream>

using namespace console;
using namespace network;

#include <iostream>

int main(int argc, char** argv)
{
	QApplication QApp(argc, argv);

	Console* console = new Console();

	Server* server = new Server();
	server->Initialise(console);

	server->Run();

	time_t t = time(0);
	struct tm now;
	localtime_s(&now, &t);

	QString year = QString::number(now.tm_year + 1900);

	QString month = QString::number(now.tm_mon + 1);
	if (month.size() < 2)
		month = "0" + month;

	QString day = QString::number(now.tm_mday);
	if (day.size() < 2)
		day = "0" + day;

	QString hour = QString::number(now.tm_hour);
	if (hour.size() < 2)
		hour = "0" + hour;

	QString min = QString::number(now.tm_min);
	if (min.size() < 2)
		min = "0" + min;

	QString sec = QString::number(now.tm_sec);
	if (sec.size() < 2)
		sec = "0" + sec;

	QString timeStamp = year + month + day + "@" + hour + min + sec;

	std::ofstream plainLogFile;
	plainLogFile.open(std::string("log") + timeStamp.toUtf8().constData() + ".txt");
	plainLogFile << console->GetQtConsole()->logging_view->toPlainText().toUtf8().constData();
	plainLogFile.close();

	std::ofstream htmlLogFile;
	htmlLogFile.open(std::string("log") + timeStamp.toUtf8().constData() + ".html");
	htmlLogFile << console->GetQtConsole()->logging_view->toHtml().toUtf8().constData();
	htmlLogFile.close();

	return 0;
}
{'fraction_non_alphanumeric': 0.18261161463578382, 'fraction_numerical': 0.014098690835850957, 'mean_word_length': 4.708812260536399, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6503277', 'n_tokens_mistral': 1151, 'n_tokens_neox': 1093, 'n_words': 249}