Setting encompasses many elements in a novel. When analyzing setting, it is important that one look at all of the facets and how they relate to the plot, characters, and literary techniques used by the author. The author can use location, time (time of day, as well as date), weather, and yes, the era during which the story takes place when developing the setting. In A Separate Peace, the war-time era is an ever-present influence on the characters. Gene and Finney started jumping from the tree because the seniors were doing it as one form of preparation for the looming draft. The boys at Devon have such a close relationship because there isn't anyone else on the campus for them to relate to - the boarding school was without young men because of the ongoing war and was populated by older teachers. While the term "war" by itself wouldn't necessarily describe the setting, it would certainly be appropriate to use the WWII-era as part of the analysis.
Setting can be used to develop and drive the plot, as discussed above, and it can also be used to set the atmosphere (mood). When the novel opens with Gene's visit fifteen years later, the atmosphere, or mood, is dreary and somber - he describes the cold wind, rain, and fog, especially when describing the tree's location. This setting and the mood that it creates serves as an element of foreshadowing - the reader knows that the tree will have great (and tragic) significance later in the novel.