View Single Post
  #6  
Old August 4th 08, 05:46 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Handle different international time zones for Item.Start and I

Keep in mind that the offsets will be different depending on whether
Daylight Savings Time (DST) is observed and whether the given date falls
with the DST.
Keep in mind that on the MAPI level, these propertiss are already stored in
UTC, so you can simply access teh raw MAPI properties using Extended MAPI,
CDO 1.21, or Redemption.
plug Redemption (url below) exposes time zones through the
RDOSession.Timeszones collection -
http://www.dimastr.com/redemption/rdo/rdotimezones.htm /plug

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"masani paresh" wrote in message
...
Thanks Ken, I have done it in following way.

sTime = Format(Item.Start,"yyyy-mm-dd" & "T" & "hh:mm:ss" & "+" &
timeOffset)
eTime = Format(Item.End,"yyyy-mm-dd" & "T" & "hh:mm:ss" & "+" &
timeOffset)

I have hard coded time offsets for different time zone that is required. I
am getting local site and corresponding time zone offset and adding it to
current time to get the UTC.

Could you see any improvement that i can make here.

Thanks,
Paresh

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

That's using VB.NET.

There are no equivalents in VBScript or Windows scripting for
ToUniveralTime().

You'd have to write your own function for that. Or you could search on
the
Web to see if anything like that has been done using VBScript or possibly
VBA or VB6. If you found code in VB6 or VBA you'd need to translate it
into
VBScript code.

--
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


"masani paresh" wrote in message
...
We can do it in VB like below:

Dim testTime As DateTime = DateTime.Now
Debug.WriteLine(testTime.ToString)
Debug.WriteLine(testTime.ToUniversalTime.ToString)

Is there any function in VBScript that can convert local time to UTC?

Thanks,
Paresh





Ads