FrankChen021 commented on issue #10066: URL: https://github.com/apache/druid/issues/10066#issuecomment-651719690
When a task is being created, druid gets the UTC TIME instead of local time based on `-Duser.timezone` property and stores that time as a UTC STRING into meta storage for that task. When querying, `Created Time` is passed from overlord to broker and then to web console always as a UTC STRING. From user's view, the `-Duser.timezone` should take effect whenever it's stored as UTC string or local date time string. To save time as string often causes problems related to timezone. A common way to handle time is to save it in unix epoch. And epoch is always passed from one interface to another. It's the client that is responsible for converting epoch to date time based on client's timezone. For this problem, to do that introduces lots of changes. I think there're 3 simple ways to handle this minor problem:, 1. `Created Time` is stilled stored as UTC time string in meta storage, when querying broker or overlord checks if the timezone `Create Time` it gets from overlord matches the timezone specified by `-Duser.timezone`, if not it converts the date time to match the user's timezone; 2. save local time and timezone information instead of utc time to meta storage when saving a task; 3. no changes involved in backend service but web console. web console converts the `Created Time` to user's local time @jihoonson ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
