From 8beefc8bfdc1d0dd5d7e5fe1c1c5c7da4b3c9009 Mon Sep 17 00:00:00 2001 From: Sergey Shcherbina Date: Mon, 17 Oct 2016 21:51:31 +0500 Subject: [PATCH] Fixed bug when all "time.Time" params in raw sql queries formatted as time --- orm/db_utils.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/orm/db_utils.go b/orm/db_utils.go index 0279a14a..923917ec 100644 --- a/orm/db_utils.go +++ b/orm/db_utils.go @@ -147,8 +147,10 @@ outFor: arg = v.In(tz).Format(formatDate) } else if fi != nil && fi.fieldType == TypeDateTimeField { arg = v.In(tz).Format(formatDateTime) - } else { + } else if fi != nil && fi.fieldType == TypeTimeField { arg = v.In(tz).Format(formatTime) + } else { + arg = v.In(tz).Format(formatDateTime) } } else { typ := val.Type()