Fixed error with setting time in create function