如何取得系統 UTC 時間 (API CEEUTC, CEEDATM) ?
File  : QRPGLESRC
Member: RTVUTCR
Type  : RPGLE
Usage : CRTBNDRPG RTVUTCR
     H DEBUG  OPTION(*SRCSTMT:*NODEBUGIO) DFTACTGRP(*NO) ACTGRP(*CALLER)
      ** Convert to arbitrary timestamp API
     d CEEDATM         PR                  opdesc
     d   input_secs                   8F   const
     d   pic_string                  26A   const options(*varsize)
     d   output_ts                   26A   options(*varsize)
     d   feedback                    12A   options(*omit)
     D CEEUTC          PR
     D   output_lil                  10I 0
     D   outptu_secs                  8F
     D   feedback                    12A   options(*omit)
     D
     D lilian          S             10I 0
     D secs            S              8F
     D zchar           S             23A   based(pZ)
     D pZ              S               *
     D timestamp       S               Z
     D utcString       S             26
     C                   callp     ceeutc (lilian : secs : *omit)
     C                   eval      pZ = %addr(timestamp)
     C                   callp     ceedatm (secs :
     C                                      'YYYY-MM-DD-HH.MI.SS.999' :
     C                                      zchar     :
     C                                      *omit)
     C*    timestamp     dsply
     C     zchar         dsply
     C                   return
A blog about IBM i (AS/400), MQ and other things developers or Admins need to know.
星期三, 11月 08, 2023
2011-03-22 如何取得系統 UTC 時間 (API CEEUTC, CEEDATM) ?
訂閱:
張貼留言 (Atom)
 
沒有留言:
張貼留言