Nick of time - Bell, Ted (St. Martin's Griffin, 2008)
With the help of Lord Hawke, whose children have been taken by the evil pirate Captain Billy Blood, young Nick McIver uses a time machine to rescue the two children as well as change the course of events in two time periods, the Napoleonic Wars and World War II