public static Timezone Parse(string timeZoneInfoDescription) { Timezone tz = new Timezone(); tz._timeZoneInfo = TimeZoneInfo.GetSystemTimeZones().Where(t => t.DisplayName.Replace("&", "and") == timeZoneInfoDescription).First(); return(tz); }
public override string ToString() { StringBuilder builder = new StringBuilder(); builder.AppendLine("BEGIN:VCALENDAR"); builder.AppendLine("VERSION:2.0"); builder.AppendLine("METHOD:PUBLISH"); builder.AppendLine("PRODID:Remote Calendar Access"); builder.AppendLine("X-WR-CALNAME:" + Title); builder.AppendLine("X-PUBLISHED-TTL:PT5M"); builder.Append(Timezone.ToString()); foreach (Event e in Events) { if (e.EventType != EventType.Deleted) { builder.Append(e.ToString(Events)); } } builder.AppendLine("END:VCALENDAR"); return(builder.ToString()); }
public static Timezone Parse(string timeZoneInfoDescription) { Timezone tz = new Timezone(); tz._timeZoneInfo = TimeZoneInfo.GetSystemTimeZones().Where(t => t.DisplayName.Replace("&", "and") == timeZoneInfoDescription).First(); return tz; }