6 Replies Latest reply: May 12, 2009 8:26 PM by Michael Solomovich RSS

    Function now() in 8.50

    Michael Solomovich

      I'm using now() on the QV-Server based application. Users who access the server are in the different time zones.
      In QVS 8.01, the function returns the timestamp of the current time from the system clock on the user machine - this is exactly what I need.
      In QVS 8.50, it returns the timestamp of the current time from the system clock on the server, and this is a big problem. I tried now(2) - same result.
      Need help getting system time of the user machine for the server-based application. Appreciate any advice.

      PS: The function is used in macro, so it doesn't make CPU to work hard. Same as using now(2) - time when the document was opened.

        • Function now() in 8.50
          Neil Miller


          I am using version 8.50.6261.5 and my Now() function is the time on my system. I changed my system clock and it correctly changed on a text box.

          I was able to recreate this using a macro and a text box.

          EDIT: I'm guessing the difference may be that your applications are being run from the server, while I am opening mine directly?


            • Function now() in 8.50
              Michael Solomovich

              Exactly. No problem locally, just in server. And, no problem if server is 8.01. It doesn't work as expected in server 8.50. Sad
              Client version was 8.50 in both cases, but I suspect it doesn't matter.

                • Function now() in 8.50
                  John Witherspoon

                  We reported a different but related problem with now() when moving from 8.? to 8.5. One of the old versions of now() gave you the START time of the reload. In version 8.5, that version of now() no longer existed. We had to instead store off now() at the start of the script in a variable, then use the variable to know when the load started. Our complaint was met with "working as designed", even though it wasn't backwards compatible, and they'd dropped a working feature.

                  I suspect you'll get the same answer, but it's worth at least bringing up. I really don't think they should have dropped EITHER of these useful features, or changed which parameters yielded which results. If they wanted NEW versions of now(), these should have been added as new options rather than having the new versions replace the old versions. Probably water under the bridge at this point, and I have no idea how else you can solve your problem.

                  Grumble grumble.

                    • Function now() in 8.50
                      Neil Miller

                      Yeah, you would think, the more options, the better. Why not have multiple functions for the various versions of Now()?

                      As for the local time problem, I wonder if you could get it from an external Excel object using a macro. You could programatically open Excel, set a field to Now() and then read that field into a variable. I would assume that the Excel instance would be opened locally and therefore Now() would be the user's time.

                      I don't have any apps running from the server, so I can't test it out. I also don't know if this would be more work than it's worth.