22 May 15:46
[groovy-user] Strange problem
I have strange problem: i have date in db like 2012-05-06 00:00:00 (midnight), but when i query for it with usage of groovy.SQL i have 2012-05-07 00:00:00 (shifted by one day). Is this kind of misconfiguration from my side? Example script:
<at> GrabConfig(systemClassLoader=true)
<at> Grab(group='postgresql', module='postgresql', version='8.4-702.jdbc4')
import org.postgresql.Driver
import groovy.sql.Sql
def PSQL_SERVER = 'localhost'
def PSQL_DB = '****'
def PSQL_LOGIN = '****'
def PSQL_PASSWORD = '****'
def psql = Sql.newInstance("jdbc:postgresql://${PSQL_SERVER}/${PSQL_DB}", PSQL_LOGIN, PSQL_PASSWORD, "org.postgresql.Driver")
def row = psql.firstRow('select published_from from brochure where id = 296218261')
Cheers
Paweł
RSS Feed