summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/mattermost-server/v6/services/timezones/timezones.go
blob: e211a4cd859c6a8498f1c22d60119f04075b9550 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package timezones

type Timezones struct {
	supportedZones []string
}

func New() *Timezones {
	timezones := Timezones{}

	timezones.supportedZones = DefaultSupportedTimezones

	return &timezones
}

func (t *Timezones) GetSupported() []string {
	return t.supportedZones
}

func DefaultUserTimezone() map[string]string {
	defaultTimezone := make(map[string]string)
	defaultTimezone["useAutomaticTimezone"] = "true"
	defaultTimezone["automaticTimezone"] = ""
	defaultTimezone["manualTimezone"] = ""

	return defaultTimezone
}