Refactor time conversion helper function for objects in db api

Refactor the code to use common time conversion code for objects. Strip
timezone info out from datetimes, which is no need for database.

This is a part of: blueprint make-instance-action-use-objects

Change-Id: Id7f8b48da1499ded3418ceebe4680e066420e2a3
Merge "Refactor time conversion helper function for objects in db api"