This depends on the embassy, however in most Chinese embassies you will only be allowed to apply for a Chinese visa three months before your planned arrival in China.