1

I have a date in UTC that I would like to use directly in my DDay iCalendar, but I cannot figure out how to tell the library that the time is in UTC. I believe it's a matter of appending a Z at the end of my time, but I can't figure out how to specify DDay should suffix with a "Z":

"Good" iCalendar Date

DTEND:20120110T223000Z

"Bad" iCalendar Date

DTEND:20120119T170000
Benny
  • 3,899
  • 8
  • 46
  • 81
  • [Here](http://www.kanzaki.com/docs/ical/dateTime.html) is a link to the section of the ICal spect that described *how* dates are formatted. It is pretty clear. – M.Babcock Jan 10 '12 at 04:18

1 Answers1

2

This is how we implement it:

string sValue = DateTime.Now.ToUniversalTime().ToString(@"yyyyMMdd\THHmmss\Z");
competent_tech
  • 44,465
  • 11
  • 90
  • 113