core/frame: add time to timestamp conversion utility function