Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set timezone (now UTC set from jvm.options) #314

Closed
Pixelshifter opened this issue Jun 18, 2020 · 11 comments
Closed

Set timezone (now UTC set from jvm.options) #314

Pixelshifter opened this issue Jun 18, 2020 · 11 comments
Labels
bug Something isn't working ui Need an ui update
Projects

Comments

@Pixelshifter
Copy link

I would like to set my own timezone. I'm running AKHQ inside a Docker-container, in which I've volume mounted the /etc/timezone file from the host. This has a different timezone set than the default (UTC), but didn't work. Some more digging lead me to https://github.com/tchiotludo/akhq/blob/dev/docker/app/jvm.options where the timezone is set within the JVM.

Without wanting to fork this project and the need to manage my internal CI/CD pipeline for this awesome tool, I was wondering if there is a way to override this timezone setting, or that we could implement an option in the application.yml to set our own timezone. Perhaps people here have found a different solution?

@tchiotludo
Copy link
Owner

Hi,

When you are talking about timezone, want date to you want to have on your timezone ?
Date display on the web ui ? Logs ? both ? others ?

Thanks

@Pixelshifter
Copy link
Author

Pixelshifter commented Jun 18, 2020

Thanks for the really fast reply! I see that the timestamp for messages in a given topic in the UI are 2 hours in the past which also applies to timestamps in the access_log.

EDIT: I want the timezone to be GMT+1.

@tchiotludo
Copy link
Owner

tchiotludo commented Jun 18, 2020

will be in the dev image in 5 minutes, help here

@Pixelshifter
Copy link
Author

Superb!!!

@Pixelshifter
Copy link
Author

Unfortunately this doesn't work :( Only solution thus far is to copy the existing jvm.options and set the timezone there and use that file, which gets injected as env-var (as per the README).

@tchiotludo
Copy link
Owner

tchiotludo commented Jun 18, 2020

Really sure ?
I've tried on my local computer and it's works !

Can you give how do you configure it ?

@Pixelshifter
Copy link
Author

Pixelshifter commented Jun 19, 2020

This is my docker run command:

/usr/bin/docker run -v /etc/localtime:/etc/localtime:ro \ -v /opt/akhq/akhq_config.yml:/app/application.yml:ro \ -e 'JAVA_OPTS=-Duser.timezone=Europe/Amsterdam' \ --name=akhq \ -p 127.0.0.1:8081:8080 private_docker_reg_url/tchiotludo/akhq:dev

Which results in this being logged (see the timestamp of journalctl (host system) vs the timestamp IN the logmessage):

Jun 19 09:07:50 localhost.localdomain docker[40419]: 2020-06-19 07:07:50,075 INFO main i.m.runtime.Micronaut Startup completed in 11559ms. Server Running: http://ec163e4fa706:8080

What DID work though was to override the whole JVM_OPTS file with my own custom jvm.options file and set the timezone there (as per your README instructions).

tchiotludo added a commit that referenced this issue Jun 27, 2020
@arunvelsriram
Copy link

arunvelsriram commented May 5, 2021

Slightly related question. Is it possible to use browser timezone in the UI, irrespective of the timezone used in the server?

@tchiotludo tchiotludo added bug Something isn't working ui Need an ui update labels May 5, 2021
@tchiotludo tchiotludo added this to Backlog in Backlog via automation May 5, 2021
@tchiotludo tchiotludo moved this from Backlog to To do in Backlog May 5, 2021
@tchiotludo
Copy link
Owner

When the ui was rework in React, this part was forgotten, I reopen,
Thanks for the report

@tchiotludo tchiotludo reopened this May 5, 2021
Backlog automation moved this from To do to In progress May 5, 2021
@jinooslee
Copy link

Waiting for the UI changes. :)

@Chaosmonkeys
Copy link

Any updates?

Backlog automation moved this from In progress to Done Sep 16, 2021
tchiotludo added a commit that referenced this issue Sep 17, 2021
tchiotludo added a commit that referenced this issue Oct 24, 2021
tchiotludo added a commit that referenced this issue Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ui Need an ui update
Projects
Status: Done
Backlog
  
Done
Development

No branches or pull requests

5 participants