Calculating Expiry date is working perfectly . It is calculated by
adding the loantime number to the current time. 

Time unit 1 minute.

so if you say loan time is 3, this means expiry time will be 3 minuets.
this is modifiable by the way, admin can do that. i will write the
interface for modifying the loantime