Skip to content

RainerRoss/Get-time-from-NTP-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Get-time-from-NTP-Server

The idea

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.

How does it work

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.

Manual install

- download NTPLOG00.SQL
- download GETNTPTIME.SQLRPGLE

- create   table NTPLOG00 
- create   program GETNTPTIME 

- call     program GETNTPTIME

Logfile result

Screenshot 2025-05-26 232035

Display messages

Screenshot 2025-05-26 232516

About

get exact time from atomic clock time server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages