Problem solve Get help with specific problems with your technologies, process and projects.

Setting the time on the AS/400

You Can View User Feedback To This Expert Response

Is there a way that I can set the time on the AS/400 to match the time on a Windows NT system that uses the Web to set its time? I would like to have my NT network and AS/400 times to be synchronized.

The operating system (OS/400) does not support auto updating of the time via the Web. The only way you can do it is by changing the system value of QTIME. If you could write a program that uses the socket API and send the request to return the Web page that you are using to access via the NT server. Once that page is returned, you can parse the page and call a CL program to update the system time. The problem is that by the time the program completed, the time would no longer be correct.

All things being equal, once the two systems are in sync, they should stay very close. I'm unclear of the way NT can access the Web to get the time, but I wonder if you could mimic the Web page on the AS/400 Web server that the NT server is currently using and use the AS/400 to set the time on the NT server.

Depending on the types of applications you are running on the AS/400, the difference in time could cause problems if the programs are using the system time. Also the job scheduler could be affected if the options are not set to run the jobs past the assigned time. In other words, if you skipped a minute from 11:59 to 12:01 and there are jobs to run at 12:00, they would not run. Changing the time on a regular basis on the AS/400 can open the door for problems since OS/400 and many programs rely on the system time.

As a foot note, if using the AS/400 mail server remember to correctly set the system value of QUTCOFFSET, which is the Coordinated Universal Time offset. The value set is plus or minus to Greenwich Mean Time. To match EST I believe it's 5.00 hours.


  • The NT system probably uses an NTP (network time protocol) or SNTP (simple network time protocol) to adjust its time to a standard. At least in V5R1 of OS/400, there is an SNTP client. It's listed in OpsNav under Network->Servers->TCP/IP as a "server" but it's a client. Be sure your QUTCOFFSET is set properly. In earlier releases an SNTP client is available through ConsultLine. It used to be $400 for an entire company - installable on all the 400s you have. — V. Hamberg

Dig Deeper on Installation

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.