use amber fork, add fmttime function