The SetColumns method in Outlook returns incorrect time values when used with tasks (208305)
The information in this article applies to:
- Microsoft Office Outlook 2003
- Microsoft Outlook 2002
- Microsoft Outlook 2000
This article was previously published under Q208305 SYMPTOMS
When you use the SetColumns method to retrieve dates or times from tasks, the times may not accurately reflect what is stored in the task.
CAUSE
With the exception of tasks, all dates in Microsoft Outlook are stored in Coordinated Universal Time (UTC), also known as Greenwich Mean Time (GMT). However, tasks store dates in local time. The SetColumns method always converts the retrieved time into local time, therefore causing the times to be offset.
WORKAROUND
Use either of the following methods to work around this behavior.
Method 1: Do not use the SetColumns method
Do not use the SetColumns method to retrieve dates with tasks. In most cases, this adversely affects your solution's performance.
Method 2: Retrieve and use an OffSetNote If you are using Microsoft Visual Basic Scripting Edition (VBScript), you cannot access the system registry and this workaround does not apply.
If you are using Microsoft Visual Basic or Microsoft Visual Basic for Applications, programmatically get the local time zone information from the computer running your application. This information is stored in the following location in the registry: HKEY_Local_Machine\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
The Bias value specifies the current bias, in minutes, for local time translation on the computer. The bias is the difference, in minutes, between local time and UTC. Use this value to correct the time retrieved using the SetColumns method.
Modification Type: | Major | Last Reviewed: | 6/26/2006 |
---|
Keywords: | kbbug kbnofix kbProgramming KB208305 |
---|
|