RTC write enable, date time restore after reboot fix

Change-Id: I1e4b08cd3484edf68802d45f7d2148d5ac5051a8