The Indian Penal Code (IPC) came into force in 1862 during British colonial rule, not in 1947. 1947 is the year of India's independence, but the IPC was drafted by the First Law Commission under Lord Macaulay and implemented much earlier, in 1862. It remains the foundation of criminal law in India.