Fix Time API

Fix Time API

Errors before these patches: 97
Errors after these patches: 58