Prevent PHP notices and broken time displays

Bug: 73111
Change-Id: I69c22e8b61e65fe2ec881f6401e4eb9e809900dd