Title: Re: Sent time display [Script]
On or near 7/8/01 2:17 PM, Michael Scheurer at [EMAIL PROTECTED] observed:

> Hi all,
> is there a way to get Entourage to display the real time a message was sent?
> What it does now is adjust the sent time to my time zone rather than the
> time  zone the message was sent in. The full headers show it correctly, the
> list view and short headers show the adjusted time.
>
> For example a message sent this list shows it's been sent "Date: Fri, 6 Jul
> 2001 20:10:18 -0400" in the full header yet the sent column and short
> headers shows it at "Saturday, 7 July 2001 10:10 AM".
> \
>
> Couldn't find anything in the list archives or the online help.
>
I wrote a script that will do it on a per message basis: Show Local Time Sent. You can find it on my web site, I believe, or just copy the following into Script Editor and compile it:

property timeZoneCities : {"<Pacific Ocean>", "Honolulu", "Anchorage", "Los Angeles/Portland", "Denver", "Chicago/Mexico City", "New York/Havana/Lima", "San Juan/Santiago/Nova Scotia", "Rio De Janero/Buenos Aires", "South Sandwich Islands", "Reykyivik/Azores", "London/Dakar", "Paris/Berlin/Lagos", "Kiev/Cairo", "Moscow/Bagdad/Nairobi", "Abu Dabi/Tehran", "Karachi", "New Delhi", "Middle of Nowhere in Asia", "Beijing/Hong Kong/Perth", "Tokyo", "Sydney", "<Pacific Ocean>", "Auckland"}

tell application "Microsoft Entourage" --
    set currentMessages to the current messages --
    repeat with theMsg in the currentMessages --
        my ProcessMsg(theMsg) --
    end repeat --
end tell --

on ProcessMsg(theMsg) --
    tell application "Microsoft Entourage" --
        set thesub to subject of theMsg
        set H to the headers of theMsg
        set H to paragraphs of H
        set dateHeader to ""
        repeat with aLine in H
            if aLine starts with "Date:" then
                beep
                set dateHeader to aLine
                exit repeat
            end if
        end repeat
        if dateHeader is not "" then
            set GMToff to (((text -5 thru -1 of dateHeader) as number) / 100) + 12
            if GMToff = 18 then set GMToff to 19
            set cityInZone to item GMToff of timeZoneCities
            display dialog "The time sent was" & return & dateHeader & " in the zone of " & cityInZone & return & "for msg: " & thesub
        else
            display dialog "Local time was not found."
        end if
    end tell --
end ProcessMsg --

--
Add me to Palm/Visor: http://signature.coola.com/?[EMAIL PROTECTED]
Allen Watson <[EMAIL PROTECTED]> XNS name: =Allen Watson
A Mac family since 1984 <http://home.earthlink.net/~allenwatson/>
Applescripts for Outlook Express and Entourage: <http://homepage.mac.com/allenwatson/>

Reply via email to