package helper

import "os"

const (
	DefaultTimeZone = "Asia/Shanghai" // 时区
)

func GetEnv(name string) string {
	return os.Getenv(name)
}

func GetEnvWithDefault(name string, defaultValue string) string {
	value := GetEnv(name)
	if value == "" {
		return defaultValue
	}
	return value
}

func GetTimeZone() string {
	return GetEnvWithDefault("TZ", DefaultTimeZone)
}
