Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


FileTimeCode and Daylight savings time

Keywords: 	 filetimecode daylight savings time GMT

Question:

Is there something about FileTimeCode that could be affected by Daylight savings time? The following code worked fine until the clocks switched.
	swdist = "\\server99"
	;is Winframe client installed?
	currentfileflag = "c:\program files\citrix\winframe client\wfcmgr32.exe"
	if FileExist(currentfileflag) ;update citrix client if newer version is available
		newfileflag = "%swdist%\distribute$\citrix\wfcmgr32.exe"
		if fileexist(newfileflag) ;distribution point is available
			a=FileTimeCode(newfileflag)
			b=FileTimeCode(currentfileflag)
			if a > b then run("%swdist%\scripts$\winframe2.exe","")
	endif
	endif

Answer:

Yes indeedee. Especially on NT. The NT routines to convert file time and system time (maintained as GMT) to local time do not take into account that the daylight savings time bias offset might change.

So when you check a file way back before, the time is handed to you with the current time settings. (as in PDT time instead of PST time).

Aaaaaaaaaaaaaaaaaaaaaaaaaaaaahhhhhh


Article ID:   W13863
Filename:   FileTimeCode and Daylight savings time.txt