/// <summary> /// Converts this trigger into the one using local time. /// </summary> /// <returns>A new trigger with UtcTime set to false and other field adjusted accordingly.</returns> public iOSNotificationCalendarTrigger ToLocal() { if (!UtcTime) { return(this); } var notificationTime = AssignDateTimeComponents(DateTime.UtcNow).ToLocalTime(); iOSNotificationCalendarTrigger result = this; result.UtcTime = false; result.AssignNonEmptyComponents(notificationTime); return(result); }
/// <summary> /// Converts this trigger into the one using UTC time. /// </summary> /// <returns>A new trigger with UtcTime set to true and other field adjusted accordingly.</returns> public iOSNotificationCalendarTrigger ToUtc() { if (UtcTime) { return(this); } var notificationTime = AssignDateTimeComponents(DateTime.Now).ToUniversalTime(); iOSNotificationCalendarTrigger result = this; result.UtcTime = true; result.AssignNonEmptyComponents(notificationTime); return(result); }