time: adapt to the new API time structrue