summaryrefslogtreecommitdiff
path: root/src/timezone.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/timezone.hh')
-rw-r--r--src/timezone.hh27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/timezone.hh b/src/timezone.hh
new file mode 100644
index 0000000..3d33eb8
--- /dev/null
+++ b/src/timezone.hh
@@ -0,0 +1,27 @@
+#ifndef TIMEZONE_HH
+#define TIMEZONE_HH
+
+#include <filesystem>
+#include <memory>
+#include <optional>
+
+class Logger;
+
+class Timezone {
+public:
+ virtual ~Timezone() = default;
+
+ static std::unique_ptr<Timezone> create(std::shared_ptr<Logger> logger,
+ std::filesystem::path geojsondb,
+ std::filesystem::path tzinfo_dir);
+
+ virtual std::optional<time_t> get_local_time(double lat, double lng,
+ time_t utc_time) const = 0;
+
+protected:
+ Timezone() = default;
+ Timezone(Timezone const&) = delete;
+ Timezone& operator=(Timezone const&) = delete;
+};
+
+#endif // TIMEZONE_HH