![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Dear,
Hope I haven't missed something simple. I used Redemption to create messages, I have noticed in some messages the time showing in Outlook client are not correct. For example, the code below set the received message date to "04- April-2003 7.17pm". However, in my Outlook client it shows "04- April-2003 8.17pm". Interestingly, other messages in different and same months shows correct date time. Is it the ime zone issue? May be its Outlook issue, wondering why the other messages shows correct time. Btw, I am in GMT +10 time zone. code RDOFolder rdoFolder = session.GetFolderFromPath(@"\\Test\Inbox"); RDOMail msg = rdoFolder.Items.Add("IPM.Note") as RDOMail; msg.Subject = "Test Message"; RDORecipient recipient = "); msg.Sender = session.CurrentUser; // Received time: 04-April-2003 7.17pm msg.ReceivedTime = new DateTime(2003, 04, 04, 19, 17, 27, 0); msg.Save(); /code Thanks for the advice. Regards, MA |
Ads |
#2
|
|||
|
|||
![]()
As explained above, the code below create message with correct date
"04-May-2003 7.17pm". Any idea why the above code add an hour to the message time? code RDOFolder rdoFolder = session.GetFolderFromPath(@"\\Test\Inbox"); RDOMail msg = rdoFolder.Items.Add("IPM.Note") as RDOMail; msg.Subject = "Test Message"; RDORecipient recipient = "); msg.Sender = session.CurrentUser; // Received time: 04-May-2003 7.17pm msg.ReceivedTime = new DateTime(2003, 05, 04, 19, 17, 27, 0); msg.Save(); /code Environment: OS: Win XP Outlook: 2003 11.8217 (SP3) Thanks, MA |
#3
|
|||
|
|||
![]()
Redemption, like Outlook, will return all named date/time properties in
local time based on your Windows time settings. Internally they are stored in UTC and are returned as such when a date/time property is accessed using a Fields collection. Are all the date/times correct on all items when viewed in the Outlook object model or a MAPI viewer? Remember that in a MAPI viewer you are looking at UTC times. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "MA" wrote in message ... As explained above, the code below create message with correct date "04-May-2003 7.17pm". Any idea why the above code add an hour to the message time? code RDOFolder rdoFolder = session.GetFolderFromPath(@"\\Test\Inbox"); RDOMail msg = rdoFolder.Items.Add("IPM.Note") as RDOMail; msg.Subject = "Test Message"; RDORecipient recipient = "); msg.Sender = session.CurrentUser; // Received time: 04-May-2003 7.17pm msg.ReceivedTime = new DateTime(2003, 05, 04, 19, 17, 27, 0); msg.Save(); /code Environment: OS: Win XP Outlook: 2003 11.8217 (SP3) Thanks, MA |
#4
|
|||
|
|||
![]()
Thanks Ken for your response.
I think the issue could be in Outlook client in respect to the day- light savings. When I create the message, I can see in VS object inspector (after the date set) the correct date time, but in Outlook client the time shows in-correct. If I un-check the Date & Time Properties - "Automatically adjust clock for daylight savings changes" all date time shows correctly. To give you an example: Step 1. Create two messages with the following code. Both message time set to 10.37am but two different date. - Message1 date: 04-April-03 10.37am - Message2 date: 06-April-03 10.37am code // Message 1: 04-April-03 10.37am RDOMail msg1 = rdoFolder.Items.Add("IPM.Note") as RDOMail; "); DateTime date = new DateTime(2003, 04, 04, 10, 37, 0, 0, DateTimeKind.Utc); msg1.Subject = string.Format("Message1 : {0}", date.ToString()); msg1.ReceivedTime = date; msg1.Save(); // Message 2: 06-April-03 10.37am RDOMail msg2 = rdoFolder.Items.Add("IPM.Note") as RDOMail; "); DateTime date2 = new DateTime(2003, 04, 06, 10, 37, 0, 0, DateTimeKind.Utc); msg2.Subject = string.Format("Message2 : {0}", date2.ToString()); msg2.ReceivedTime = date2; msg2.Save(); /code Step 2: - Time zone: GMT +10 time zone (Sydney) - Check "Automatically adjust clock for daylight savings changes" checkbox - Message 1 shows in Outlook client 11.37am - Message 2 shows in Outlook client 10.37am Results: Shows in-correct time for Message 1 (offset by an hour) Step 3: - Un-check "Automatically adjust clock for daylight savings changes" checkbox - Message 1 shows in Outlook client 10.37am - Message 2 shows in Outlook client 10.37am Results: Shows correct time for both messages In both occasion, using Outlook Spy - ReceivedTime shows 11:37 AM, 4/04/2003. I don't understand why the Message1 add an hour when "Automatically adjust clock for daylight savings changes" checked where the Message 2 shows correct time regarless of the daylight savings auto adjust checkbox Thanks again for the advice. Regards, MA |
#5
|
|||
|
|||
![]()
Thanks Ken for your response.
I think the issue could be in Outlook client in respect to the day- light savings. When I create the message, I can see in VS object inspector (after the date set) the correct date time, but in Outlook client the time shows in-correct. If I un-check the Date & Time Properties - "Automatically adjust clock for daylight savings changes" all date time shows correctly. To give you an example: Step 1. Create two messages with the following code. Both message time set to 10.37am but two different date. - Message1 date: 04-April-03 10.37am - Message2 date: 06-April-03 10.37am code // Message 1: 04-April-03 10.37am RDOMail msg1 = rdoFolder.Items.Add("IPM.Note") as RDOMail; "); DateTime date = new DateTime(2003, 04, 04, 10, 37, 0, 0, DateTimeKind.Utc); msg1.Subject = string.Format("Message1 : {0}", date.ToString()); msg1.ReceivedTime = date; msg1.Save(); // Message 2: 06-April-03 10.37am RDOMail msg2 = rdoFolder.Items.Add("IPM.Note") as RDOMail; "); DateTime date2 = new DateTime(2003, 04, 06, 10, 37, 0, 0, DateTimeKind.Utc); msg2.Subject = string.Format("Message2 : {0}", date2.ToString()); msg2.ReceivedTime = date2; msg2.Save(); /code Step 2: - Time zone: GMT +10 time zone (Sydney) - Check "Automatically adjust clock for daylight savings changes" checkbox - Message 1 shows in Outlook client 11.37am - Message 2 shows in Outlook client 10.37am Results: Shows in-correct time for Message 1 (offset by an hour) Step 3: - Un-check "Automatically adjust clock for daylight savings changes" checkbox - Message 1 shows in Outlook client 10.37am - Message 2 shows in Outlook client 10.37am Results: Shows correct time for both messages In both occasion, using Outlook Spy - ReceivedTime shows 11:37 AM, 4/04/2003. I don't understand why the Message1 add an hour when "Automatically adjust clock for daylight savings changes" checked where the Message 2 shows correct time regarless of the daylight savings auto adjust checkbox Thanks again for the advice. Regards, MA |
#6
|
|||
|
|||
![]()
Double check to make sure that the time zone settings in Outlook for the
Calendar properties is the same as the time zone settings set up in the Windows Control Panel settings for time and date. Also make sure the time zone update for Outlook has been installed. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "MA" wrote in message ... Thanks Ken for your response. I think the issue could be in Outlook client in respect to the day- light savings. When I create the message, I can see in VS object inspector (after the date set) the correct date time, but in Outlook client the time shows in-correct. If I un-check the Date & Time Properties - "Automatically adjust clock for daylight savings changes" all date time shows correctly. To give you an example: Step 1. Create two messages with the following code. Both message time set to 10.37am but two different date. - Message1 date: 04-April-03 10.37am - Message2 date: 06-April-03 10.37am code // Message 1: 04-April-03 10.37am RDOMail msg1 = rdoFolder.Items.Add("IPM.Note") as RDOMail; "); DateTime date = new DateTime(2003, 04, 04, 10, 37, 0, 0, DateTimeKind.Utc); msg1.Subject = string.Format("Message1 : {0}", date.ToString()); msg1.ReceivedTime = date; msg1.Save(); // Message 2: 06-April-03 10.37am RDOMail msg2 = rdoFolder.Items.Add("IPM.Note") as RDOMail; "); DateTime date2 = new DateTime(2003, 04, 06, 10, 37, 0, 0, DateTimeKind.Utc); msg2.Subject = string.Format("Message2 : {0}", date2.ToString()); msg2.ReceivedTime = date2; msg2.Save(); /code Step 2: - Time zone: GMT +10 time zone (Sydney) - Check "Automatically adjust clock for daylight savings changes" checkbox - Message 1 shows in Outlook client 11.37am - Message 2 shows in Outlook client 10.37am Results: Shows in-correct time for Message 1 (offset by an hour) Step 3: - Un-check "Automatically adjust clock for daylight savings changes" checkbox - Message 1 shows in Outlook client 10.37am - Message 2 shows in Outlook client 10.37am Results: Shows correct time for both messages In both occasion, using Outlook Spy - ReceivedTime shows 11:37 AM, 4/04/2003. I don't understand why the Message1 add an hour when "Automatically adjust clock for daylight savings changes" checked where the Message 2 shows correct time regarless of the daylight savings auto adjust checkbox Thanks again for the advice. Regards, MA |
#7
|
|||
|
|||
![]()
The behaviour is the same.
Time zone settings are the same in Outlook (Calendar Option - Time zone) and in Control Panel - Date&Time. Also installed the time zone update as explained in the KB: http://support.microsoft.com/kb/931667 Thanks, MA |
#8
|
|||
|
|||
![]()
The behaviour is the same.
Time zone settings are the same in Outlook (Calendar Option - Time zone) and in Control Panel - Date&Time. Also installed the time zone update as explained in the KB: http://support.microsoft.com/kb/931667 Thanks, MA |
#9
|
|||
|
|||
![]()
The behaviour is the same.
Time zone settings are the same in Outlook (Calendar Option - Time zone) and in Control Panel - Date&Time. Also installed the time zone update as explained in the KB: http://support.microsoft.com/kb/931667 Thanks, MA |
#10
|
|||
|
|||
![]()
Then I'm not sure. I'd probably experiment with getting the DateTime values
and using ToUTC() and play with that for a while to see if things are being converted as expected and also try converting back, as well as trying the MAPIUtils methods for local to UTC and UTC to local to make sure everything is being converted both ways as expected. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "MA" wrote in message ... The behaviour is the same. Time zone settings are the same in Outlook (Calendar Option - Time zone) and in Control Panel - Date&Time. Also installed the time zone update as explained in the KB: http://support.microsoft.com/kb/931667 Thanks, MA |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Manually change 'Date Sent', 'Date received' in messages ... how ? | baxe0 | Outlook and VBA | 2 | September 15th 15 01:02 PM |
Outlook received time incorrect | ewolfman | Outlook - General Queries | 2 | May 1st 07 12:55 PM |
Manually change 'Date Sent', 'Date received' in messages ... how ? | baxe0 | Outlook - Using Forms | 0 | March 21st 07 02:46 PM |
Incorrect Date showing as Received Date | Sean | Outlook - General Queries | 0 | December 27th 06 09:05 AM |
messages received show incorrect time in time sent | admulley | Outlook - General Queries | 1 | October 10th 06 02:45 PM |