Why not using this http://arduino.cc/en/Tutorial/UdpNtpClient example and make the loop() (a bit modified to fulfill your needs) just a function you call when you wanna your RTC corrected?
Why not using this http://arduino.cc/en/Tutorial/UdpNtpClient example and make the loop() (a bit modified to fulfill your needs) just a function you call when you wanna your RTC corrected?