Fix postfix plugin age to use ctime, not mtime (#3525)

This commit is contained in:
Patrick Hemmer
2017-11-29 14:25:31 -05:00
committed by Daniel Nelson
parent 2c70958c24
commit bf65e19486
5 changed files with 63 additions and 11 deletions

View File

@@ -0,0 +1,16 @@
// +build darwin freebsd
package postfix
import (
"syscall"
"time"
)
func statCTime(sys interface{}) time.Time {
stat, ok := sys.(*syscall.Stat_t)
if !ok {
return time.Time{}
}
return time.Unix(stat.Ctimespec.Unix())
}