Torna al Thread

' ************* STRUTTURA ORA SISTEMA PER SICRO DATA ORA Public Structure SYSTEMTIME Public wYear As UInt16 Public wMonth As UInt16 Public wDayOfWeek As UInt16 Public wDay As UInt16 Public wHour As UInt16 Public wMinute As UInt16 Public wSecond As UInt16 Public wMilliseconds As UInt16 End Structure '******************* FUNZIONI PER ACQUISIRE E IMPOSTARE L'ORA DI SISTEMA Declare Function GetSystemTime Lib "CoreDll.dll" _ (ByRef lpSystemTime As SYSTEMTIME) As UInt32 Declare Function SetSystemTime Lib "CoreDll.dll" _ (ByRef lpSystemTime As SYSTEMTIME) As UInt32 '*************** IMPOSTO ORA DI SISTEMA UTILIZZANDO DELLE VARIABILI Public Sub SET_ORA() 'Inizializzazione Struttura Dim SYNC_ORA As New SYSTEMTIME 'Recuperiamo l'ora corrente GetSystemTime(SYNC_ORA) 'Modifico ora e data SYNC_ORA.wHour = (ORA_PALMARE - 1) ' INSERIRE IL - 1/x RISPETTO AL FUSO ORARIO IMPOSTATO SUL PALMARE ( ORA DI AMSTERDAM IMPOSTATA E' +1) SYNC_ORA.wMinute = (MIN_PALMARE) SYNC_ORA.wSecond = SEC_PALMARE SYNC_ORA.wDay = GG_PALMARE SYNC_ORA.wMonth = MM_PALMARE SYNC_ORA.wYear = AA_PALMARE 'Riapplico la nuova ora SetSystemTime(SYNC_ORA) End Sub
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5