* model -> public/model * plugin -> public/plugin * public/model/utils -> public/utils * platform/shared/mlog -> public/shared/mlog * platform/shared/i18n -> public/shared/i18n * platform/shared/markdown -> public/shared/markdown * platform/services/timezones -> public/shared/timezones * channels/einterfaces -> einterfaces * expose public/ submodule * go mod tidy * .github: cache-dependency-path, setup-go-work * modules-tidy for public/ too * remove old gomodtidy
26 строки
723 B
Go
26 строки
723 B
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
package model
|
|
|
|
import (
|
|
"time"
|
|
|
|
mm_model "github.com/mattermost/mattermost-server/server/public/model"
|
|
)
|
|
|
|
// GetMillis is a convenience method to get milliseconds since epoch.
|
|
func GetMillis() int64 {
|
|
return mm_model.GetMillis()
|
|
}
|
|
|
|
// GetMillisForTime is a convenience method to get milliseconds since epoch for provided Time.
|
|
func GetMillisForTime(thisTime time.Time) int64 {
|
|
return mm_model.GetMillisForTime(thisTime)
|
|
}
|
|
|
|
// GetTimeForMillis is a convenience method to get time.Time for milliseconds since epoch.
|
|
func GetTimeForMillis(millis int64) time.Time {
|
|
return mm_model.GetTimeForMillis(millis)
|
|
}
|