I've created an ASP.net application and I'm using Google Calendar API (Google.GData.Calendar) to schedule/add an event in Google calendar.
FYI, My client is from South Australia and my site is hosted on Godaddy India server.
In Australia from Oct to April is the daylight saving time. (South Australia (SA): First Sunday in October First Sunday in April Earlier observed DST in 1917 and 1942-1944 years. Since 1971 uses it regularly.)
Here is the problem I'm facing:
When I add an event from the site, from India, then event added on same time without any variations even in daylight saving days. But when my client add an event, from South Australia, then event added one hour early. E.g. If event time is 10AM-11AM, then it will be 9AM-10AM.
Sometimes event add on right time from South Australia using iPad/Tab/some other PCs.
Here is my code for the event:
var startHour = new DateTime(dtstartdatetime.Year, dtstartdatetime.Month, dtstartdatetime.Day, startTime.Hours, startTime.Minutes, 00).ToUniversalTime().AddHours(-7);
var startHour1 = new DateTime(dtstartdatetime.Year, dtstartdatetime.Month, dtstartdatetime.Day, endTime.Hours, endTime.Minutes, 00).ToUniversalTime().AddHours(-7);
Australia has 6 time zones and we are adjusting the event start and end time according to it.
Please let me know where I've to do changes