2021-10-28 Fred Gleason <fredg@paravelsystems.com>

* Refactored the 'RDTimeEngine::StartEvent()' method to account for
	Daylight Saving Time transitions properly.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-10-29 11:56:51 -04:00
parent ca60833fed
commit 3a102c03e6
3 changed files with 67 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
// rdtimeengine.h
//
// An event timer engine.
// Event timer engine.
//
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
//
@@ -26,6 +26,7 @@
#include <QObject>
#include <QSignalMapper>
#include <QTimer>
#include <QTimeZone>
class RDTimeEngine : public QObject
{
@@ -46,6 +47,8 @@ class RDTimeEngine : public QObject
private:
void StartEvent(int id);
void DumpTimeZone(const QTimeZone &tz) const;
void DumpTransition(QTimeZone::OffsetData offset) const;
QMap<int,QTime> d_times;
QMap<int,QTimer *> d_timers;
QSignalMapper *d_mapper;