Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Exchange ActiveSync UTC for Calendar Items

Posted on 2014-01-06
Last Modified: 2014-01-20
Color me a bit confused. I am attempting to write an IOS client application to communicate with Exchange ActiveSync and display calendar information. But I am seeing some conflicting information in the protocol docs when compared to what I am getting from Exchange. Either that or I am somehow misinterpreting one or the other.

My intent is to save an appointment in my local database in Coordinated Universal Time and then have the UI read in the information and display it as appropriate to the local timezone. In this way an recurring appointment created before daylight saving time for Noon will still be at the same time of day in local time as an appointment created during daylight saving time for noon. But they are not.

My understanding of the documentation is as such:

In MS-ASCAL pdf section (roughly page 34) it says for Start Time that : ...the value of this element is a dateTime data type as specified in MS-ASDTYPE section 2.3.

Moving to MS-ASDTYPE section 2.3 (roughly page 7) the dateTime value is specified in the format of ISO-8601 and all dates are given in Coordinated Universal Time (UTC)

Looking up coordinated universal time I see that UTC does not changed with the seasons as local or civil time does and therefore DOES NOT support daylight saving time. This makes sense, as DST is decidedly local and is ignored by many areas. You cannot know from the perspective of UTC whether or not to apply a DST offset without knowing what timezone and area the time represents, therefore no daylight saving time can be supported. Based on this information I should be able to just slap the dates into my database as they are and merely have the UI adjust itself to display them properly.

However, as a tested I began seeing a divergence of an hour between the two appointments in the database before the UI has even read them. To confirm this I created two recurring appointments representing Lunch at 12 noon local time. One that starts on March 1st 2014 (Standard Time) and one that starts on March 10th 2014 (daylight saving time) in the eastern timezone. This should be March X 2014 at 1700 hours in both cases should it not?

In the WBXML/XML that I am receiving I am getting two different times. The appointment that starts during standard time gives me a start time of 20140301T170000Z. The appointment that starts after daylight saving time is in effect locally gives me 20140301T160000Z.

The difference between the two times is 1 hour, which is the daylight saving time offset. It is my perception based on everything that I have read both in the microsoft protocol documentation and outside it that these two times should be the same and that whatever client that gets to display them should be the one putting the offset in place as needed. Noon local time is noon local time but local time is the province of the local municipality/timezone, not that of UTC.

So my question is what exactly is going on here? Are the start/stop/date stamp date times in UTC or not. If they are in UTC, then why are they offset by an hour instead of being at the same time? Obviously outlook displays these correctly for local time, because both appear at noon. But in my case my database contains locally adjusted times instead of the UTC times I thought I was getting which is throwing off when those appointments appear in the UI.

Can someone please clarify what's going on here and what I should be seeing?

Question by:lrwdigital
  • 5
  • 4
LVL 69

Accepted Solution

Qlemo earned 225 total points
ID: 39791528
What you get is correct. 01-MAR-2014 12:00pm is +5, as expected. 10-MAR-2014 12:00pm is +4(!) because of DST. As stated correctly, Zulu time (UTC) is not changing with DST, but your time is.

Author Comment

ID: 39794184
Thanks for the response.

I agree that Zulu time shouldn't be changing. But that's not what I am seeing from exchange, hence my confusion.

If I create an appointment for 12pm UTC, it should still be 12pm UTC no matter what time of year it is shouldn't it?  Because UTC doesn't support Daylight saving time?

It is up to the client to figure out what 12pm UTC is in local time because perhaps today the client is in New York City EST but tomorrow the client is in Istanbul. If exchange is already applying the daylight saving time offset for EST then i would need to remove it before I can switch timezones or the time will be off in the new timezone.
LVL 69

Expert Comment

ID: 39794377
Obviously you are overlooking that the appointments are set via the UI, and hence are subject to DST and timezone settings before they get into the DB ...
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.


Author Comment

ID: 39794511
So you're saying that because these appointments were created in outlook, they're being tagged with my local timezone and that's why I'm seeing this difference?
LVL 69

Expert Comment

ID: 39794987

Author Comment

ID: 39795390
So the docs are incorrect then and I need to strip off the DST bias as needed before I stick it in my DB. *sigh*

Author Comment

ID: 39795421
I've requested that this question be closed as follows:

Accepted answer: 0 points for lrwdigital's comment #a39795390

for the following reason:

The person who answered explained exactly what was going on.
LVL 69

Expert Comment

ID: 39795422
Didn't you intend to accept one of my comments?

Author Comment

ID: 39795441
Sorry, thought I did. Must have hit the wrong one or something.

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Utilizing an array to gracefully append to a list of EmailAddresses
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

839 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