summaryrefslogtreecommitdiff
path: root/src/timezone.hh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2021-11-17 22:34:57 +0100
committerJoel Klinghed <the_jk@spawned.biz>2021-11-17 22:34:57 +0100
commit6232d13f5321b87ddf12a1aa36b4545da45f173d (patch)
tree23f3316470a14136debd9d02f9e920ca2b06f4cc /src/timezone.hh
Travel3: Simple image and video display site
Reads the images and videos from filesystem and builds a site in memroy.
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