Neither a GMT adjustment nor DST account for the difference entirely as the  
following code illustrates. Also 1 seconds adjustments, such as we might  
use for versioning don't work properly, either. The GMT adjustment alone  
will probably be good enough for most purposes.

If so inclined reply to [email protected]

* clear
* STRTOFILE("Nolly","test.txt")
? FileTouch("test.txt",DATETime(2007,2,7),-5) && My birthday, EST
? FileTouch("test.txt",DATETime(2007,2,7)+1,-5) && 1 second adjust
? FileTouch("test.txt",DATETime(2007,2,7)+2,-5) && 2 second adjust
? FileTouch("test.txt",DATETime(2007,2,7)+3,-5) && 3 sec adjust
* ADIR(aFoo,"test.txt")
* DISPLAY MEMORY LIKE afoo

FUNCTION FileTouch
LPARAMETERS cFileName, tNewTime, nGMTAdjustment
LOCAL nYear, nMonth, nDay, nHour, nMinutes, nSeconds
* Turn adjustment hours into seconds
nGMTAdjustment = (nGMTAdjustment * 60 * 60)
* Convert tNewTime into the adjusted time
tNewTime = tNewTime + nGMTAdjustment
* Parse out the FoxTouch() parameter components
nYear = YEAR(tNewTime)
nMonth = MONTH(tNewTime)
nDay = DAY(tNewTime)
nHour = HOUR(tNewTime)
nMinutes = MINUTE(tNewTime)
nSeconds = SEC(tNewTime)
Set Library to ("c:\vfp projects\framework\flls\FoxTools.fll")
FoxTouch(cFileName, nYear, nMonth, nDay, nHour, nMinutes, nSeconds)
RETURN FDATE(cFileName,1)



On Mar 16, 2009 5:21pm, Dan Olsson <[email protected]> wrote:
> At 2009-03-17 03:15, Malcolm wrote:


> >BTW: I think(?) the reason for the 4 vs. 5 hour time difference is


> >due to variations in how daylights saving time is applied, eg. if


> >you're using 4 hours now, you may need to change this to 5 hours at


> >some point in the future and then plan on making a similar


> >adjustment when we set the clocks back in the fall.





> Yes, the function does not know about DST


> Some docs at http://support.microsoft.com/kb/114949





> ******************************


> * Dan Olsson


> * [email protected]>


> * http://www.dolittle.se>








> _______________________________________________


> Post Messages to: [email protected]


> Subscription Maintenance:
> OT-free" target="_blank">http://leafe.com/mailman/listinfo/profox


> OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech


> Searchable Archive: http://leafe.com/archives/search/profox


> This message:  
> http://leafe.com/archives/byMID/profox/[email protected]


> ** All postings, unless explicitly stated otherwise, are the opinions of  
> the author, and do not constitute legal or medical advice. This statement  
> is added to the messages for those lawyers who are too stupid to see the  
> obvious.





> Report [OT] Abuse:  
> http://leafe.com/reportAbuse/[email protected]





--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to