classAnova - Knowledge Shared


Posted by: Bob Cozzi
IT Researcher
Cozzi Productions, Inc.
North Aurora, IL
RPG Open - Documentation Group
has no ratings.
Published: 08 Feb 2011
Revised: 04 Aug 2011 - 4642 days ago
Last viewed on: 17 Apr 2024 (4835 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

RPG Open - Documentation Group Published by: Bob Cozzi on 08 Feb 2011 view comments

RPG Open

GetGMT - Get Greenwich Mean Time

Syntax Diagram

timestamp = getGMT( [ timeStamp ] );

The getGMT subprocedure returns the GMT equivalent of the input timeStamp value. If not input timeStamp value is specified, the current system timestamp is used.

This subprocedure converts the input timestamp value into the GMT equivalent by adding the UTC Offset to the timestamp. Since both the date and time may change during the conversion, a full TimeStamp value must be specified. The special value %TIMESTAMP() may be specified to indicate that the current system timestamp is used--but it is also the default for this subprocedure.

      /free
            cookieExpDate = getGMT(%timeStamp() + %minutes(30) );  // Returns GMT + 30 minutes
      /end-free

The two primary uses for GETGMT are:

  1. To return the current time in GMT for reporting purposes.
  2. To create an expiration time for Web Browser Cookies (used in CGI/Web programming).

Return to RPGOpen.com

Return to classanova.com home page.
Sort Ascend | Descend

COMMENTS