File tree Expand file tree Collapse file tree
src/it/scala/scalikejdbc/bigquery Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package scalikejdbc .bigquery
22
3- import java .time .{ ZoneId , Instant , ZonedDateTime }
3+ import java .time .ZonedDateTime
44
55import scalikejdbc ._
66
@@ -21,8 +21,6 @@ object Post extends SQLSyntaxSupport[Post] {
2121 override val columns = Seq (" id" , " body" , " posted_at" )
2222
2323 implicit val postIdBinders : Binders [PostId ] = Binders .int.xmap(PostId .apply, _.value)
24- implicit val zonedDateTimeTypeBinder : TypeBinder [ZonedDateTime ] =
25- TypeBinder .jodaDateTime.map(t => ZonedDateTime .ofInstant(Instant .ofEpochMilli(t.getMillis), ZoneId .of(" UTC" )))
2624
2725 val p = this .syntax(" p" )
2826
Original file line number Diff line number Diff line change @@ -64,7 +64,8 @@ class QueryDSLIntegration extends FlatSpec with BigQueryFixture {
6464 .list
6565 .run(executor)
6666
67- val result = response.result
67+ // handle environment-dependent TimeZone difference
68+ val result = response.result.map(p => p.copy(post = p.post.copy(postedAt = p.post.postedAt.withZoneSameInstant(ZoneId .of(" UTC" )))))
6869
6970 assert(result.size == 3 )
7071
You can’t perform that action at this time.
0 commit comments