On Sep 01, 2006, at 17:13 UTC, Peter K. Stys wrote: > My spotlight client retrieves file mod dates and times, but these are > in GMT (I assume). Is there a simple call that will convert a GMT > date/time (e.g. 2006-09-01 17:02:02) to a Mac's local date/time for > display, allowing for daylight savings, etc?
Yes: 1. Create a New Date object. 2. Set its .GMTOffset = 0 (perhaps storing the previous value in a local variable). 3. Assign the GMT date/time however you like to do that (probably by assigning to SQLDateTime). You now have a date object in GMT that correctly represents the date/time of the file. 4. Change the .GMTOffset back to its previous value. This updates the totalSeconds accordingly, so you now have a date object that represents the same date/time but in your local time zone. Best, - Joe -- Joe Strout -- [EMAIL PROTECTED] Verified Express, LLC "Making the Internet a Better Place" http://www.verex.com/ _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
