Solved

Daylight savings time adjustment in Outlook Meeting (.vcs) file?

Posted on 2002-05-02
7
732 Views
Last Modified: 2008-01-09
I'm dynamically creating a Microsoft Outlook Meeting file (.vcs file) through an ASP page that gets appointment info out of a database. I then link to that file on the web page. This process works fine.
Here's the problem:

Appointment times are all in US Eastern Standard Time. When I create the .vcs file, I generate the time for the appointment to be in GMT (so I add 5 hours to the appointment time).

10:00 am EST = 3:00 pm GMT

so in a vcs file...

5/2/2002 10:00am EST = 20020502T150000Z

This supposedly should automatically make the adjustment in a client's Outlook when they open up the vcs file. However, ever since daylight savings time has passed, some of my users around the world have been getting appointment times showing up as an hour off.

I ran a couple of tests on my machine and I noticed that when I have the Windows setting: 'Automatically adjust for daylight savings' turned on, the times are 1 hour out of whack. When I turn it off, the times are ok.

Anyone have any ideas on how to get around this? Any way of determining if a clients system is set to automatically adjust daylight savings?

Thanks in advance...
0
Comment
Question by:SuperLeon
7 Comments
 
LVL 18

Expert Comment

by:bruno
ID: 6986769
*listening*

0
 
LVL 6

Expert Comment

by:gete
ID: 6987951
also listening...

Don't know if the following article would help or not:
Calendaring: Understanding the Client Side
http://www.exchangeadmin.com/Articles/Index.cfm?ArticleID=7697
0
 
LVL 1

Accepted Solution

by:
SuperLeon earned 0 total points
ID: 7006440
I couldn't find a really good way around this so I succumbed to the quick fix 'hey...it works doesnt it?' method. According to the time of year, I adjust the number of hours I add to the current date to account for daylight savings time (since most computers are set to automatically adjust for it). I created a function that returns the hour difference between EST and GMT. It returns 4 or 5 depending on the time of year. Seems to work.


function GMTDateDiff()
     'this function calculates the GMT hour time difference
     'taking into accoun Daylight Saving Time (based on server current date)
     
     DSTyear = year(now)
     
     'DST is between first Sunday of April and Last Sunday of October
     
     'find first Sunday of April in current year
     for x = 1 to 7
          DSTchkDate = cdate("4/" & x & "/" & DSTyear)
          if weekday(DSTchkDate) = 1 then
               DSTStartDate = DSTchkDate
               exit for
          end if    
     next
     
     'find last Sunday in October in current year
     for x = 31 to 25 step -1
          DSTchkDate = cdate("10/" & x & "/" & DSTyear)
          if weekday(DSTchkDate) = 1 then
               DSTEndDate = DSTchkDate
               exit for
          end if    
     next
     
     if now() <= DSTEndDate and now() >= DSTStartDate then
          GMTDateDiff = 4
     else
          GMTDateDiff = 5
     end if
end function
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 18

Expert Comment

by:bruno
ID: 7006532
you complete me.
0
 
LVL 15

Expert Comment

by:gladxml
ID: 8795666
No comment has been added lately and it seems that this question have been abandoned. So it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question or invite a Moderator to close this question if there's no reply from you after seven days.

In the absence of responses, I will recommend the following:

Question PAQ and point refunded

** PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER **


Just trying to help for the cleanup...
gladxml
0
 
LVL 18

Expert Comment

by:bruno
ID: 8796620
mod,

please accept superleon's comment above with the code as the answer if possible.


thanks,

bruno
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Summernote and form validation 10 192
INNER JOIN ? 8 50
can I post data from an asp page to php page? 4 57
Issues with Insert statement 12 29
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question