What I want to do
Because the query result of Datetime type data is inconsistent with the written result, can we set a different time zone for dgraph?
Dgraph metadata
dgraph version
Dgraph version : v20.11.2
Dgraph codename : tchalla-2
Commit timestamp : 2021-02-23 13:07:17 +0530
Branch : HEAD
Go version : go1.15.5
jemalloc enabled : true
MichelDiz
(Michel Diz)
April 21, 2021, 11:30am
2
Not sure what is the issue here.
Yes. We use this standard RFC 3339 - Date and Time on the Internet: Timestamps
e.g: 1996-12-19T16:39:57-08:00 is PST timezone. UTC−08:00 - Wikipedia
The Datetime field I set to enter is different from the time I queried using the java client.
How to set dgraph to a time zone other than UTC?
MichelDiz
(Michel Diz)
April 21, 2021, 11:56am
4
As far as I know rfc3339 supports only UTC.
So, your issue is related to Dgraph’s client?
jdgamble555
(Jonathan Gamble)
April 21, 2021, 12:05pm
5
You can set your timezone in java on your date time object:
java, timezone
1 Like
Yes, I want to get the same time as the write time through the java client.
It is indeed a method, but the time I found on the retal may be different, but it is mainly based on the results found by the client. Thank you for your reminder.