There are requirements where the exact time is needed from the NTP server for IBM i applications. Unfortunately I have not found a webservice for this and have decided to write a RPG program to get the time from the NTP service.
Normally I would have assumed to get the data via a GET or POST request but unfortunately this does not work for NTP servers because they only communicate via sockets. At this point I would like to thank Scott Klement https://www.scottklement.com/rpg/socktut/tutorial.html whose socket tutorial has served me very well.
- download NTPLOG00.SQL
- download GETNTPTIME.SQLRPGLE
- create table NTPLOG00
- create program GETNTPTIME
- call program GETNTPTIME

