#1
  1. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Sep 2003
    Posts
    44
    Rep Power
    16

    How to show local time and date


    Well I am not interested in getting time and date from users computer for my web site because sometime it does not give the right information. So do you have any other idea how I can get local time and date (approximately accurate) for my web site. Necessary code will be very helpfull. Thank you.
  2. #2
  3. Contributing User
    ASP Scholar (3000 - 3499 posts)

    Join Date
    Jun 2004
    Posts
    3,072
    Rep Power
    194
    Hi

    I think you've not got a response because your question is a bit confusing. Presuming you want to display your server's local date and time, use a PHP or ASP script. PHP uses time(), ASP uses Date() or Now()

    MK
  4. #3
  5. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jun 2004
    Posts
    50
    Rep Power
    15
    I think he/she's asking for a way to display local time of whoever's looking at the page without using their computer's time settings. But that's not possible, as you don't really have a way to know where they are. If you wanted to get complicated you could probably figure out some stuff with tracing their IP/ISP but even that doesn't promise 100% locational accuracy.

    My advice would be to just use the user's clock, or the server clock (and state which timezone the server's in).

Similar Threads

  1. get user date and time
    By Descenter in forum ASP Development
    Replies: 9
    Last Post: April 25th, 2004, 05:15 PM
  2. ASP displaying a date instead of a time?
    By K0r34nB0y in forum ASP Development
    Replies: 2
    Last Post: February 25th, 2004, 12:42 AM
  3. Date and time
    By thehen in forum Programming Help
    Replies: 0
    Last Post: October 16th, 2003, 03:17 AM
  4. controlling date and time formats in an asp-generated email
    By Steve Schofield in forum ASP Development
    Replies: 1
    Last Post: January 22nd, 2001, 02:04 PM

IMN logo majestic logo threadwatch logo seochat tools logo