Updated code to set time on the bucket