File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ namespace sqlpp
67
67
const auto dp = ::sqlpp::chrono::floor <::date::days>(t._t );
68
68
const auto time = ::date::make_time (t._t - dp);
69
69
const auto ymd = ::date::year_month_day{dp};
70
- context << " TIMESTAMP WITH TIME ZONE '" << ymd << ' ' << time << " +00 '" ;
70
+ context << " TIMESTAMP '" << ymd << ' ' << time << " '" ;
71
71
return context;
72
72
}
73
73
} // namespace sqlpp
Original file line number Diff line number Diff line change 28
28
#ifndef SQLPP_POSTGRESQL_SERIALIZER_H
29
29
#define SQLPP_POSTGRESQL_SERIALIZER_H
30
30
31
+ #include < sqlpp11/chrono.h>
31
32
#include < sqlpp11/parameter.h>
32
33
#include < sqlpp11/wrap_operand.h>
33
34
@@ -54,6 +55,16 @@ namespace sqlpp
54
55
55
56
return context;
56
57
}
58
+
59
+ template <typename Period>
60
+ postgresql::context_t & serialize (const time_point_operand<Period>& t, postgresql::context_t & context)
61
+ {
62
+ const auto dp = ::sqlpp::chrono::floor <::date::days>(t._t );
63
+ const auto time = ::date::make_time (t._t - dp);
64
+ const auto ymd = ::date::year_month_day{dp};
65
+ context << " TIMESTAMP WITH TIME ZONE '" << ymd << ' ' << time << " +00'" ;
66
+ return context;
67
+ }
57
68
}
58
69
59
70
#endif
You can’t perform that action at this time.
0 commit comments