Time API fixes

Time API fixes