2
0
mirror of https://github.com/status-im/consul.git synced 2025-01-12 06:44:41 +00:00
2023-10-10 10:58:06 -04:00

20 lines
409 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
//go:build solaris
package logging
import (
"os"
"syscall"
"time"
)
func (l *LogFile) createTime(stat os.FileInfo) time.Time {
stat_t := stat.Sys().(*syscall.Stat_t)
createTime := stat_t.Ctim
// Sec and Nsec are int32 in 32-bit architectures.
return time.Unix(int64(createTime.Sec), int64(createTime.Nsec)) //nolint:unconvert
}