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
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
  • 5
  • 4
LVL 70

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 70

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 ...
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.


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 70

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 70

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
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…

688 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