Datetime() - time not correct


(Ddebeul) #1

Hi, when using the command "return datetime()" I get the date & time in return but the time isn't correct (one hour earlier). It's probably a setting that I need to modify somewhere in neo4j. Can you help ?


(Paul Drangeid) #2

I believe you are getting UTC returned. I typically utilize timestamp(), and then use the apoc features to convert to the format (and optionally the local timezone):

for example:
return apoc.date.format(timestamp(),'ms','yyyy-MM-dd HH:mm:ss.sss','CST')


(Ddebeul) #3

Thanks, another approach which works.