fixed timep handling in time()
Merge pull request #48 from efornara/time_fix

fixed timep handling in time()