Re: MAPI Received Time 1 Hour Earlier Than Outlook 2003 Received T



Hi Ken,

I have looked at the timezone value and it is 1, which is correct for my
timezone. I am having this problem on a customers site, the emails have the
correct date/time in outlook but the wrong date/time using CDO. I dont have
this problem on my computer, but when I forward an email from my customers
site to me the email has the correct date/time in outlook but the wrong
date/time in CDO, but only for the emails forwarded from the customers site,
not the ones already in the inbox.

I have used a UTC to local time conversion function which converts all the
customers forwarded emails to the correct date/time (adds 1 hour) but it also
adds 1 hour to all the emails that were already in the inbox and correct
anyway. Is there a way to check which emails need converting and which dont?

Also how does outlook know which to change and which to leave? Is it
possible to use the same function outlook uses?

I could use the outlook object model to get the date/time but it would mean
re-writing parts of my code and also this seems abit over-kill just to get
the date/time. Surely theres a function which can be used with CDO to do this?

Kind regards,

Matt

"Ken Slovak - [MVP - Outlook]" wrote:

> OK, with CDO there can be a disconnect between your Windows and Outlook
> settings and what CDO is doing.
>
> Outlook and Windows use a registry value to determine the user's time zone.
> Then when you get a date using the Outlook object model that local time zone
> is used to convert the stored GMT values to local time.
>
> CDO on the other hand looks at the registry settings but also looks at the
> first DWORD of property 0x7D020102 in the Inbox, which is the property
> that's used for Session.GetOption("TimeZone") and for SetOption.
>
> CDO will usually revert to using GMT and not convert to local time if the
> property DWORD doesn't match up with the registry setting, but it can get
> confused easily. Things that can corrupt that DWORD include logging into a
> mailbox from a different time zone where the computer is set for that
> different time zone, and logging into a mailbox using OWA from a kiosk or
> machine in a different time zone.
>
> I'd suggest running a simple macro to display the value of
> Session.GetOption("TimeZone") and see if it matches the value for your time
> zone as listed in the CDO.HLP file. If it's incorrect then you can use
> SetOption to correct that DWORD.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "Matthew Gibson" <MatthewGibson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:6AB57BEB-661E-432D-A8A6-FD50817F31B2@xxxxxxxxxxxxxxxx
> > Im using CDO 1.2.1. As far as i'm aware all the computers are on GMT. The
> > system is running in the UK. How do know if I need to do the conversion.
> > What
> > values do I have to check?
>
>
.



Relevant Pages

  • Re: MAPI Received Time 1 Hour Earlier Than Outlook 2003 Received T
    ... with CDO there can be a disconnect between your Windows and Outlook settings and what CDO is doing. ... Outlook and Windows use a registry value to determine the user's time zone. ... Then when you get a date using the Outlook object model that local time zone is used to convert the stored GMT values to local time. ...
    (microsoft.public.outlook.program_vba)
  • Re: Time zone in Date/Time fields
    ... Outlook 2007, however, does allow you to associate a time zone with a date/time property, which makes planning itineraries a little easier. ... exact times by the travel department. ...
    (microsoft.public.outlook.program_forms)
  • Re: Get GMT or UTC from message
    ... Long value that corresponds to an enum defined for CDO. ... The local time zone information is also stored in the Windows registry. ... > I know how to get the "Sent Time" from the Outlook MAPI interface. ... time from the Exchange server if they are connected to an Exchange Server ...
    (microsoft.public.outlook.program_forms)
  • Re: Possible to Disable Object Model Guard?
    ... Author of Microsoft Outlook 2007 Programming: ... Message.Configuration details for CDO. ... Dim OutMail As Object ... Dim cell As Range, FileCell As Range, rng As Range ...
    (microsoft.public.outlook.program_vba)
  • Re: Searching items in non-visible folder?
    ... Then you most definitely don't have CDO installed on that system. ... expand the Outlook section and ensure that Collaboration Data ... >> If you logon using an existing profile, ... >>> items in the folder looking for the messages that I want? ...
    (microsoft.public.outlook.program_forms)

Loading