lvjw
March 22, 2023, 5:53am
1
I use the API provided by Graylog, but the timestamp of the returned data is located in UTC. The user and system time zones have also been modified to the current time zone, but there is no way to return the normal time through the API.
So how do I fix this returned exception
lvjw
March 22, 2023, 5:55am
2
New users can only upload one image, so they can only upload images by replying
lvjw
March 22, 2023, 6:12am
4
The time zone parameters filled in the API also cannot take effect
gsmith
(GSmith)
March 22, 2023, 9:13pm
5
Heloo && welcome @lvjw
I looked over your post,not sure. Only idea I can think of when using API is that Opensearch and/or Elastic defaults to UTC.
joe.gross
(Joe Gross)
March 22, 2023, 10:54pm
6
Is the time returned accurate in UTC?
lvjw
March 23, 2023, 12:35am
7
The database of es has not been changed. The default time zone may be UTC, but the API interface of Graylog has not changed the time zone
lvjw
March 23, 2023, 12:37am
8
This is indeed the UTC time, but the time zone parameter in the API did not change the timestamp after use
Hi lvjw,
I tested this myself and found the same result. The time_zone parameter is ignored. IMO this is a bug (not working as designed/intended). I’ve opened an issue here: `/api/views/search/messages` does not obey `time_zone` argument, always returns UTC · Issue #15030 · Graylog2/graylog2-server · GitHub .
lvjw
March 24, 2023, 5:26am
10
There is indeed this problem, and neither the user’s time zone nor the server’s time zone is used
system
(system)
Closed
April 7, 2023, 5:27am
11
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.