So did M Night Shyamalan steal the idea for this movie from a novel?
https://en.wikipedia.org/wiki/Running_Out_of_Time_(Haddix_novel)
Jessie Keyser is a 13-year-old girl from the village of Clifton, Indiana, in the 1840s. During a village-wide outbreak of diphtheria, Jessie's mother reveals it is actually 1996, and Clifton Village is a tourist attraction, a replica of a historical village.