SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    May 2006
    Location
    Hyderabd
    Posts
    35
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to retrieve Server Time and Date

    Hi All,

    I am automating web based application using QTP 9.0, after certain actions date and time displayed on the web page of the application (which is on client machine) and this time is Server time\Date not client time\Date.

    Now, I have to verify this time(on the web page) with the Time displayed on the Server machine.

    Please, can anyone guide me - how can I retrieve the server time and Date while automating the application from the client machine.

    kiran_sweng@yahoo.com

    Thanks,
    Kiran

  2. #2
    Senior Member
    Join Date
    Jan 2000
    Location
    USA, CA
    Posts
    1,998
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to retrieve Server Time and Date

    This is not application relative problem.
    Verify just ones by looking at the time on tester's PC and compare with time, displayed on application (from Server).
    If there is difference - suggest synchronize the Server time. There are a lot of tools for time synchronization. Normally, IT administrator should know how to do that. He\she is responsible for synchronizing NetWork and personal PC's for the company.

  3. #3
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: How to retrieve Server Time and Date

    I dont think there is a way to validate this normally but you can look into WMI scripting to see if you can get something to work on the remote server and get the time.

  4. #4
    Advanced Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    817
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to retrieve Server Time and Date

    I like what i know and I know what i like

  5. #5
    Member
    Join Date
    May 2006
    Location
    Hyderabd
    Posts
    35
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to retrieve Server Time and Date

    Hi Maxj,

    I will try your the code available in the link u provided to me and let you know the Result.

    Hi Jobtash,

    I need not do any synchronization at the server Time or Date. Only I need to verify completed time which is displayed on the Page after completion of Data sumssion from the application with Server Time. For this I need to retrive the server time.

    Anyway i will try with the link provided by "maxj".

    Very happy see good suggestions here.

    kiran

  6. #6
    Member
    Join Date
    May 2006
    Location
    Hyderabd
    Posts
    35
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to retrieve Server Time and Date

    Hi Maxj,

    I have tried with the code available in the above given link and result was nagative. Same code is perfectly workfing for Host machine (client machine) when I mention the Name of the host. But , when i provided server machine name in the code i am getting error in the line where GetObject function is used.

    If you any further guidlines , kindly provide me.
    Regards,
    kiran

  7. #7
    Senior Member
    Join Date
    Jan 2002
    Posts
    678
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to retrieve Server Time and Date

    Getting server time that way might be a problem due to security. In most cases unless you have admin rights on the server you cannot get time that way.

    The webserver date and time when response was sent can be found in the header of an HTTP response. Many creative ways around to get the header info. Might try that.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:05 AM.

Copyright BetaSoft Inc.