aboutsummaryrefslogtreecommitdiff
path: root/mapping/traits-pgsql.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'mapping/traits-pgsql.cxx')
-rw-r--r--mapping/traits-pgsql.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/mapping/traits-pgsql.cxx b/mapping/traits-pgsql.cxx
new file mode 100644
index 0000000..026e15f
--- /dev/null
+++ b/mapping/traits-pgsql.cxx
@@ -0,0 +1,19 @@
+// file : mapping/traits-pgsql.cxx
+// author : Constantin Michael <constantin@codesynthesis.com>
+// copyright : not copyrighted - public domain
+
+#include "traits-pgsql.hxx"
+
+namespace odb
+{
+ namespace pgsql
+ {
+ namespace
+ {
+ tm pg_epoch_tm = {0, 0, 0, 1, 1, 100, 0, 0, 0, 0, 0};
+ }
+
+ const time_t value_traits<date, id_date>::pg_epoch_tt (
+ mktime (&pg_epoch_tm));
+ }
+}