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.

Local timezone ignored

michela
Node Clone

I'm unable to get localdatetime() working on any DBMS as documented and so can't correctly add useful timestamps

i.e. "localtime() returns the current LocalTime value. If no time zone parameter is specified, the local time zone will be used."

https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-localtime

Testing with 4.4.3 (running via Neo4J Desktop 1.4.15 on Windows) and 4.4.11 (running Neo4J Enterprise on Debian 10.11)

Entering CYPHER queries in the Neo4j Browser CLI:

 
return localtime() - always returns UTC time (i.e. not the local time)
 
return localtime({timezone: 'Australia/Sydney'})  - this gives correct system local time.
 
What configuration do I need on the DBMS to be able to use localdatetime() as documented and confirm it's using local TZ correctly? 
 
I've confirmed system local time is correct and applied the following settings. Note - log file is also still in UTC despite other posts point me at a setting to change this below.
 
# Custom Settings
apoc.export.file.enabled=true
apoc.import.file.enabled=true
dbms.directories.timezone=Australia/Sydney
dbms.jvm.additional=-Duser.timezone="Australia/Sydney"
dbms.logs.timezone=SYSTEM
3 REPLIES 3


Try dbms.db.timezone=SYSTEM


On 4.4.3, this doesn't change localdatetime from UTC but does change log TZ