The court's mandatory obligation to consider the time an accused person has spent in custody prior to sentencing, as stipulated in section 333(2) of the Criminal Procedure Code, is a fundamental principle in ensuring just sentencing.