conversion to calendar can result in error with bad timestamp