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

How to get visitor's time?

Discussion in 'XenForo Development Discussions' started by vij, May 10, 2016.

  1. vij

    vij Active Member

    How to get visitor's time? Is it possible to get time based on the 'device time' of the visitor? or some other way?
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    The visitor's time is the current UTC time stamp modified by whatever their time zone setting dictates.
     
  3. vij

    vij Active Member

    Sorry Chris. I dont follow. I am no developer but I am told by a developer who I am hiring that it is a very herculian task to get visitor's actual time.
    Is it possible to get the visitor's (I mean guest) time in a straightforward manner. The guest wouldn't have any 'setting' obviously.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    In JavaScript:
    Code:
    var now = new Date();
     
    vij likes this.
  5. vij

    vij Active Member

    Thankyou. So it can be used to get the client side guest time too... hehe. Thanks :)
     

Share This Page