ERROR_INVALID_HANDLE
6 (0x6)
The handle is invalid.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx
Ya tenemos una pieza m谩s para completar el puzzle
ERROR_INVALID_HANDLE
6 (0x6)
The handle is invalid.
Lo anterior no cuenta, era un error mio en las pruebas. Hoy llevo demasiadas horas de ordenador ![]()
SetFTime() me devuelve .T. lo que quiere decir que Windows dice que todo ha ido bien, pero... las horas son distintas.
3:14:20 antes
5:14:20 despues
Asi que como se ha comentado, esta bien salvo la diferencia horaria. En mi opini贸n, o es un bug de Windows, o tenemos que indicarle previamente la diferencia horaria de alguna forma.
Remarks
Not all file systems can record creation and last access times and not all file systems record them in the same manner. For example, on FAT, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time has a resolution of 1 day (really, the access date). Therefore, the GetFileTime function may not return the same file time information set using SetFileTime. NTFS delays updates to the last access time for a file by up to one hour after the last access.
UTCtoARG(@dDate,@cTime)//---------------------------------------------------------------------------------------------------------------
Function UTCtoARG(dDate,cTime) 聽 // le sumo 3 horas para que una funci贸n que la convierte en utc
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽聽聽 聽 聽 聽// me deje la hora tal cual la necesito. o sea, retorna la
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽// hora que llega pero con 3 horas sumadas y obviamente le suma un d铆a
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽// si esto es necesario
local nHora:=val(substr(cTime,1,2))+3, cHora:=substr(cTime,1,2)
//msginfo("Entra "+dtoc(dDate)+"---"+ctime)
if nHora>24 聽 聽 // si se da esta condici贸n, la date hay que aumentarle un d铆a
聽聽 聽聽 聽 nHora:=nHora-24
聽 聽 聽 聽 聽 聽 if len( cHora:=alltrim(str(nHora)) ) == 1 聽// para agregarle un cero adelante cuando es la una,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽// las dos, etc
聽 聽聽聽 聽 聽 聽 cHora:="0"+cHora
聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 cTime:=cHora+substr(cTime,3,6)聽
聽 聽 聽 聽 dDate:=dDate+1
聽 聽 else
聽 聽 聽 聽
聽 聽 聽 聽 if len( cHora:=alltrim(str(nHora)) ) == 1 聽// para agregarle un cero adelante cuando es la una,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 //las dos, etc
聽 聽聽聽 聽 聽 聽 cHora:="0"+cHora
聽 聽 聽 聽 endif
聽 聽 聽 聽 cTime:=cHora+substr(cTime,3,6)
endif
//msginfo("Sale "+dtoc(dDate)+"---"+ctime)
Return nil
//---------------------------------------------------------------------------------------------------------------