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 eca20036b7
commit b6e8214396
5 changed files with 63 additions and 11 deletions

View File

@@ -0,0 +1,16 @@
// +build dragonfly linux netbsd openbsd solaris
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.Ctim.Unix())
}