1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question How To Know Database Server Hour

Discussion in 'Development' started by Marco Mendoza, Aug 31, 2017.

  1. Marco Mendoza

    Marco Mendoza Member


    I have a question about how to get the database server Time.

    My OE database is on a AIXSever (OE 10.1C04).
    I have a Webspeed application, runs on a Windows Server (IIS 6.0), the AIX database is connected.
    The time between both servers is different, by 7 minutes more or less.
    Example, If I run display string(time,"HH:MM:SS") from AIX, it show 08:23:27; but from the webspeed program it show 08:30:46.

    How can I get from webspeed program the same Aix hour? Maybe with some VST table?
  3. Cringer

    Cringer ProgressTalk.com Moderator Staff Member

    Why do you need to know? And wouldn't it be better to have them both display the correct time all the time?
  4. Rob Fitzpatrick

    Rob Fitzpatrick ProgressTalk.com Sponsor

    There is no VST field that contains the current time, though there are various time stamp fields for things like user logins, transaction starts, etc.

    I suppose you could have your WebSpeed agent begin a transaction and then immediately check _Trans for the transaction start time. But if the real issue is that you implicitly trust the correctness of the AIX server's system time and not the WebSpeed server's time, why not synchronize their clocks with the same time source? Then you won't have to check the DB server's time, you'll just be able to check NOW().
  5. TomBascom

    TomBascom Curmudgeon

    You could use the TIME-SOURCE session handle to make AIX the master source.
    grinder and Marco Mendoza like this.
  6. Rob Fitzpatrick

    Rob Fitzpatrick ProgressTalk.com Sponsor

    Another thought: you can get the database start time (_dbstatus._dbstatus-starttime) and uptime (_actsummary._summary-uptime) and do the math.
    Marco Mendoza likes this.
  7. Marco Mendoza

    Marco Mendoza Member

    On AIX I have the transactions (materials transfers); and on webspeed I need to display (like an ANDON system) the ellapsed time since the transaction to Now; the problem was "Now" is not the same hour on Webspeed.
    Ideally both servers should have the exactly same hour .. ideally.
  8. Marco Mendoza

    Marco Mendoza Member

    It worked like a charm, thank you!
  9. Marco Mendoza

    Marco Mendoza Member

    It worked too Tom! Thank you.

Share This Page