File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
postgresql-async/src/test/scala/com/github/mauricio/async/db/postgresql Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,22 @@ class TimeAndDateSpec extends Specification with DatabaseTestHelper {
200
200
201
201
}
202
202
203
+ " handle sending a LocalDateTime and return a LocalDateTime for a timestamp without timezone column" in {
204
+
205
+ withTimeHandler {
206
+ conn =>
207
+ val date1 = new LocalDateTime (2190319 )
208
+
209
+ await(conn.sendPreparedStatement(" CREATE TEMP TABLE TEST(T TIMESTAMP)" ))
210
+ await(conn.sendPreparedStatement(" INSERT INTO TEST(T) VALUES(?)" , Seq (date1)))
211
+ val result = await(conn.sendPreparedStatement(" SELECT T FROM TEST" ))
212
+ val date2 = result.rows.get.head(0 )
213
+
214
+ date2 === date1
215
+ }
216
+
217
+ }
218
+
203
219
" handle sending a date with timezone and retrieving the date with the same time zone" in {
204
220
205
221
withTimeHandler {
You can’t perform that action at this time.
0 commit comments