mirror of
https://github.com/gofiber/fiber.git
synced 2025-02-23 22:23:47 +00:00
* ✨feature: print all routes message when server starts * ✨feature: print all routes message when server starts * ✨feature: print all routes message when server starts * 🐛fix: errors unhandled * 🐛fix: ignore child process and add some "-" to the table head * 🐛fix: add printRoutesMessage for listener and listenTLS
22 lines
614 B
Go
22 lines
614 B
Go
//go:build windows && amd64
|
|
// +build windows,amd64
|
|
|
|
package ole
|
|
|
|
import (
|
|
"errors"
|
|
"syscall"
|
|
"time"
|
|
"unsafe"
|
|
)
|
|
|
|
// GetVariantDate converts COM Variant Time value to Go time.Time.
|
|
func GetVariantDate(value uint64) (time.Time, error) {
|
|
var st syscall.Systemtime
|
|
r, _, _ := procVariantTimeToSystemTime.Call(uintptr(value), uintptr(unsafe.Pointer(&st)))
|
|
if r != 0 {
|
|
return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil
|
|
}
|
|
return time.Now(), errors.New("Could not convert to time, passing current time.")
|
|
}
|