chore: release 0.29.0.rc0 (#1600)

This commit is contained in:
Jan-Otto Kröpke
2024-09-11 00:34:10 +02:00
committed by GitHub
parent 83b0aa8f62
commit f712c07c38
119 changed files with 5113 additions and 2255 deletions

View File

@@ -1,14 +1,16 @@
package kernel32
import (
"syscall"
"unsafe"
"golang.org/x/sys/windows"
)
var (
kernel32 = syscall.NewLazyDLL("kernel32.dll")
kernel32 = windows.NewLazySystemDLL("kernel32.dll")
procGetDynamicTimeZoneInformationSys = kernel32.NewProc("GetDynamicTimeZoneInformation")
kernelLocalFileTimeToFileTime = kernel32.NewProc("LocalFileTimeToFileTime")
)
// SYSTEMTIME contains a date and time.
@@ -50,3 +52,11 @@ func GetDynamicTimeZoneInformation() (DynamicTimezoneInformation, error) {
return tzi, nil
}
func LocalFileTimeToFileTime(localFileTime, utcFileTime *windows.Filetime) uint32 {
ret, _, _ := kernelLocalFileTimeToFileTime.Call(
uintptr(unsafe.Pointer(localFileTime)),
uintptr(unsafe.Pointer(utcFileTime)))
return uint32(ret)
}