fix bug in format date