The movie takes place around the time of WWI, definitely before 1923. In the carnival scene, the calliope is heard playing "Ain't She Sweet". This was the number one song ... in 1927.
During the "punishment" bible reading scene, while James Dean was reading out loud, he was swearing under his breath. This was to evoke anger from the actor who played his father - he was a devout Christian.