Depending upon your location, you may have tried this exactly during the hour that exists twice. (You omitted your call to setTimezone, so we don’t know.) It wouldn’t be shocking if that’s a code path that’s not well exercised since it happens in the US exactly one hour per year.
Of course, your code is going to give the appearance of a lockup if it’s unable to contact pool.ntp.org for whatever reason. Depending on where you’re calling that from, you may even encounter an unhandled watchdogtimer interrupt.