Giter VIP home page Giter VIP logo

Comments (16)

tgly307 avatar tgly307 commented on June 7, 2024

I found a temporary solution, I added a line in time zone of settings_schema in plugin.json to set the time zone.
{"display_name": "Local", "value": "Local"},
I guess this problem may be caused by a dependency package.

from standup-raven.

harshilsharma63 avatar harshilsharma63 commented on June 7, 2024

@tgly307 big thanks for the bug report!

I did a quick try but I'm not getting this error. Will try it out again with a clean setup.

from standup-raven.

harshilsharma63 avatar harshilsharma63 commented on June 7, 2024

BTW which version of Mattermost are you using?

from standup-raven.

tgly307 avatar tgly307 commented on June 7, 2024

My mattermost version is 5.10.0, run by docker-compose. I build the image by myself and run docker-compose up, maybe the issue is related with the build part? My OS is centOS7 64bit.

from standup-raven.

hubpav avatar hubpav commented on June 7, 2024

I have the same issue - Europe/Prague is reported as unknown time zone. Mattermost version 5.9.0 through Docker Compose deployment.

from standup-raven.

harshilsharma63 avatar harshilsharma63 commented on June 7, 2024

@tgly307 @hubpav can you try running this code from StackOverflow answer - https://stackoverflow.com/a/40130882/1589165

Inserting code here for quick reference -

package main

import (
	"fmt"
	"io/ioutil"
	"strings"
)

var zoneDirs = []string{
	// Update path according to your OS
	"/usr/share/zoneinfo/",
	"/usr/share/lib/zoneinfo/",
	"/usr/lib/locale/TZ/",
}

var zoneDir string

func main() {
	for _, zoneDir = range zoneDirs {
		ReadFile("")
	}
}

func ReadFile(path string) {
	files, _ := ioutil.ReadDir(zoneDir + path)
	for _, f := range files {
		if f.Name() != strings.ToUpper(f.Name()[:1]) + f.Name()[1:] {
			continue
		}
		if f.IsDir() {
			ReadFile(path + "/" + f.Name())
		} else {
			fmt.Println((path + "/" + f.Name())[1:])
		}
	}
}

This will generate a list of timezone strings available for your system. I suspect this is something system-specific.

It would be helpful if you could tell which OS are you on.

from standup-raven.

tgly307 avatar tgly307 commented on June 7, 2024

@harshilsharma I guess the problem is on the alpine image, because the image is based on the alpine image. It is estimated that the time zone setting here is different from that of centOS. I enable the official experimental feature ExperimentalTimezone, then I chose automatic in user profile setting, the time zone is displayed as Shanghai instead of Asia/Shanghai

from standup-raven.

harshilsharma63 avatar harshilsharma63 commented on June 7, 2024

@tgly307 good point! I didn't realize that. I compiled the timezone list on MacOS but they run fine for me, even though I'm also running local Mattermost via docker-compose.

from standup-raven.

harshilsharma63 avatar harshilsharma63 commented on June 7, 2024

Let me correct that, I'm not running Mattermost via docker, but directly via the make run command from the source code. I'll test with MM docker as well.

from standup-raven.

harshilsharma63 avatar harshilsharma63 commented on June 7, 2024

I'm able to reproduce it on docker version of Mattermost. We have a copy of this plugin running on Ubuntu and the timezones work fine with it. Like you mentioned, it seems to be an issue with Alpine managing timezones.

from standup-raven.

harshilsharma63 avatar harshilsharma63 commented on June 7, 2024

@tgly307 @hubpav would it be possible for you to install the compiled version of Mattermost to try with?

from standup-raven.

tgly307 avatar tgly307 commented on June 7, 2024

What is compiled version? The docker image is built with the package after compiled. Do you mean this?

from standup-raven.

scottleedavis avatar scottleedavis commented on June 7, 2024

PR just merged in mattermost-docker likely solved this problem.

from standup-raven.

tgly307 avatar tgly307 commented on June 7, 2024

@harshilsharma hi, by PR of @scottleedavis ,the problem is solved, the time zone can be set to other one. The issue can be close if you want. Thanks for the work.

from standup-raven.

hubpav avatar hubpav commented on June 7, 2024

👍

from standup-raven.

harshilsharma63 avatar harshilsharma63 commented on June 7, 2024

@scottleedavis thanks for the docker fix!

Referring the PR here for reference - mattermost/mattermost-docker#390

from standup-raven.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.