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

[BUG] #7964

Open
ravi96b opened this issue Sep 2, 2024 · 6 comments
Open

[BUG] #7964

ravi96b opened this issue Sep 2, 2024 · 6 comments
Labels
bug Something isn't working needs more info Requires more information from poster

Comments

@ravi96b
Copy link

ravi96b commented Sep 2, 2024

Describe the bug

Display logs in UTC instead of Browser time.
In the current OFD logging stack is there any way to change the timezone to default UTC in code level as whenever we run the cluster setup job(basically will reatrt the opensearch) the OpenSearch dashboard timezone is selected as browser.
Then we need to manually change the timezone to UTC which will be persisted only till the next cluster setup job.

Can we add this feature into the OFD logging stack?.

Actually, I also wanted to understand if there is a way to achieve this through configuration files, or if it can only be done via the UI?

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

OpenSearch Version
Please list the version of OpenSearch being used.

Dashboards Version
Please list the version of OpenSearch Dashboards being used.

Plugins

Please list all plugins currently enabled.

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Browser and version [e.g. 22]

Additional context

Add any other context about the problem here.

@ravi96b ravi96b added bug Something isn't working untriaged labels Sep 2, 2024
@CCongWang
Copy link
Contributor

Hi @ravi96b could you please provide more info? like which OFD versions you are using? screenshots will be helpful, thanks!

@CCongWang CCongWang added needs more info Requires more information from poster and removed untriaged labels Sep 12, 2024
@ravi96b
Copy link
Author

ravi96b commented Sep 13, 2024

Hi @CCongWang ,

The OFD version using v 2.7.0 .

Timezone for date formatting is the parameter which i want make changes , i want to persist the timezone to always to UTC .
For now as am aware the only option is from UI , but after every restart it changes back to browser time zone.

{DEA59B0D-49AE-4863-B4B4-8F87A016E7F2} {B29FFB72-5F49-4D11-ACE8-C5BF8C27424B}

@ravi96b
Copy link
Author

ravi96b commented Oct 15, 2024

Hi @CCongWang / Colleagues,

Any update?.

Regards,
Ravi

@Hailong-am
Copy link
Collaborator

Hailong-am commented Oct 15, 2024

i want to persist the timezone to always to UTC .
For now as am aware the only option is from UI , but after every restart it changes back to browser time zone.

@ravi96b after you made the change, can you do a additional check with dev tools for below request? make sure "dateFormat:tz": "UTC" exist in the search result.

GET .kibana/_search
{
  "query": {
    "term": {
      "type": {
        "value": "config"
      }
    }
  }
}

An example response

{
        "_index": ".kibana_4",
        "_id": "config:3.0.0",
        "_score": 3.7711172,
        "_source": {
          "config": {
             ...
            "dateFormat:tz": "UTC"
          },
          "type": "config",
          "references": [],
          "migrationVersion": {
            "config": "7.9.0"
          },
          "updated_at": "2024-10-15T10:05:53.211Z"
        }
      }

@ravi96b
Copy link
Author

ravi96b commented Oct 15, 2024

Hi @Hailong-am

The purpose is not validation; instead of making the changes every time from the OpenSearch dashboard (UI), we want to persist the change to dateFormat: "UTC". Therefore, we request guidance on how to achieve this in the configuration files.

Because the changes get reverted back to dateFormat:"browser time" after ofd restart .

@Hailong-am
Copy link
Collaborator

Hailong-am commented Oct 15, 2024

Hi @Hailong-am

The purpose is not validation; instead of making the changes every time from the OpenSearch dashboard (UI), we want to persist the change to dateFormat: "UTC". Therefore, we request guidance on how to achieve this in the configuration files.

Because the changes get reverted back to dateFormat:"browser time" after ofd restart .

I see, try this in your opensearch_dashboards.yml file, that will make it fixed as UTC and not able to change via UI.

uiSettings:
  overrides:
    "dateFormat:tz": "UTC"

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs more info Requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants