From 285bed59e3f3641debfa0bc7883c8287cf2bb3d6 Mon Sep 17 00:00:00 2001 From: Kleissner Date: Tue, 19 Oct 2021 17:36:18 +0200 Subject: [PATCH] webapi: Document time zone behavior. --- webapi/readme.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webapi/readme.md b/webapi/readme.md index 1294295..0204fd7 100644 --- a/webapi/readme.md +++ b/webapi/readme.md @@ -65,6 +65,8 @@ These are the functions provided by the API: # API Documentation +All times used by the API (both input and output) are UTC based. It is the frontend's responsibility to convert the times to the local time zone for visualization to the end user where appropriate. + ## Informational Functions ### Status @@ -578,6 +580,8 @@ type SearchRequestResponse struct { } ``` +Note that the date format for the `datefrom` and `dateto` fields is "2006-01-02 15:04:05" which is different to native JSON time encoding used elsewhere. The time zone is UTC. + Example POST request to `http://127.0.0.1:112/search`: ```json @@ -610,6 +614,8 @@ If reset is set, all results will be filtered and sorted according to the provid The statistics of all results (regardless of applied runtime filters) can be returned immediately in the `statistics` field by specifying `&stats=1`. If will be only provided if the statistics change, i.e. if at least one file is returned. The returned statistics is the `SearchStatisticData` structure and matches with what is returned by `/search/statistic`. +Note that the date format for the `&from=` and `&to=` parameters is "2006-01-02 15:04:05" which is different to native JSON time encoding used elsewhere. The time zone is UTC. + ``` Request: GET /search/result?id=[UUID]&limit=[max records] Optional parameters: