APIs by Example: System Date and Time APIs and Utilities

IBM continues to add to the System i date and time support from release to release. This support involves different system components and facilities including Work Management, CL commands, IBM Systems Director Navigator for i5/OS, as well as system APIs. Regarding the latter, release 5.3 brought quite a few new date and time APIs, some of which I presented in a number of earlier APIs by Example articles. Please follow links at the end of this article to look up these articles.

Today, I discuss and demonstrate some of the APIs that I haven’t yet covered. To help me fulfill that objective, I’ve written three new date and time CL commands that serve both as a date and time API introduction and as utilities providing alternate access to system date and time information. The three commands are named Adjust System Time (ADJSYSTIME), Set System Time (SETSYSTIME), and Display System Time Information (DSPSYSTIME).

Not only were new date and time APIs introduced with release 5.3, but the system’s Licensed Internal Code (LIC) changed the way it tracks time in that release. It now keeps track of time internally, in Coordinated Universal Time (UTC) instead of local time. Although IBM officially has expressed no commitment to how and when complete time zone support at job level will be fully implemented, you will notice that from release to release, an increasing number of improvements in terms of system and job attributes pointing in time zone direction are surfacing.

Download the save file containing the source code.

Read the entire article

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s