cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Datetime() - time not correct

ddebeul
Node Link

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 ?

2 REPLIES 2

pdrangeid
Graph Voyager

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
Node Link

Thanks, another approach which works.