Search Unity

LocalNotifications.timeZone set to defaultTimeZone

Discussion in 'iOS and tvOS' started by Bestlis, Jan 5, 2016.

  1. Bestlis

    Bestlis

    Joined:
    Jan 15, 2014
    Posts:
    32
    Hello!
    Does anybody knows how I can set timezone to defaultTimeZone.
    Here is my code:


    UnityEngine.iOS.LocalNotification notif = new UnityEngine.iOS.LocalNotification ();
    notif.fireDate = System.DateTime.Now.AddSeconds (20);
    notif.timeZone = ???????????
    notif.alertAction = "ALERT123";
    notif.alertBody = "Local Notification...";
    print("FireDate: " + notif.fireDate);
    UnityEngine.iOS.NotificationServices.ScheduleLocalNotification (notif);

    When I skip setting timezone, I get time -2 hours as system time.
     
    Last edited: Jan 5, 2016
  2. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    I don't set the timeZone property and it works fine for me.