Converts a local file time to a file time based on UTC
#include <Date.au3>
_Date_Time_LocalFileTimeToFileTime ( $pLocalTime )
| $pLocalTime | Pointer to a $tagFILETIME structure that specifies the local file time to be converted into a UTC based file time. |
#include <Date.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $g_idMemo
Example()
Func Example()
Local $tTime, $tLocal
; Create GUI
GUICreate("Time", 400, 300)
$g_idMemo = GUICtrlCreateEdit("", 2, 2, 396, 296, $WS_VSCROLL)
GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New")
GUISetState(@SW_SHOW)
; Show local date/time as UTC
$tTime = _Date_Time_EncodeFileTime(@MON, @MDAY, @YEAR, @HOUR, @MIN, @SEC)
$tLocal = _Date_Time_LocalFileTimeToFileTime(DllStructGetPtr($tTime))
MemoWrite("Local date/time .: " & _Date_Time_FileTimeToStr($tLocal))
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>Example
; Write a line to the memo control
Func MemoWrite($sMessage)
GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1)
EndFunc ;==>MemoWrite