Results 1 to 1 of 1

Thread: /dhtmltutors/live-local-time-google-time-zone-api.shtml no longer working?

  1. #1
    Join Date
    Jan 2021
    Thanked 0 Times in 0 Posts

    Default /dhtmltutors/live-local-time-google-time-zone-api.shtml no longer working?

    1) Script Title: Displaying the Live Local Time of Any City with Google Time Zone API

    2) Script URL (on DD):

    3) Describe problem:


    I’ve been following this tutorial but the script no longer seems to be working.

    There may be a typo error here:

    var apicall = '' + loc + '×tamp=' + timestamp + '&key=' + apikey
    should be
    But even with that fixed I’m still getting:

    TypeError: null is not an object (evaluating 'container.innerHTML = localdate.toLocaleTimeString() + ' (' + daysofweek[ localdate.getDay() ] + ')’')
    in the console.
    I’m afraid my Javascript is very limited but I can usually work through tutorials like these.

    This seems to be the only tutorial giving practical instructions on how to create a world clock using the Google Timezone API and I’m very grateful for this.

    I just want to create a simple digital clock showing hours and minutes in various locations across the globe.

    I’d really love to get the script working.

    It may well be that the script works perfectly and I have made a mistake somewhere, but if there is an error in the code or the Google Timezone API has changed since the script was written, it would be great if someone could let me know how to rework it.

    Many thanks for your help.
    Last edited by james438; 01-16-2021 at 01:10 AM. Reason: format

Similar Threads

  1. Local Time Script - Time Format
    By MizzBia in forum Dynamic Drive scripts help
    Replies: 8
    Last Post: 06-20-2011, 12:37 PM
  2. Local Time script not displaying time at all
    By kittiekat in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 01-26-2010, 02:46 AM
  3. Format time stamp to Local time zone
    By unitedlocalbands in forum JavaScript
    Replies: 2
    Last Post: 09-18-2007, 06:00 PM
  4. Replies: 2
    Last Post: 10-22-2006, 01:25 PM
  5. Replies: 2
    Last Post: 06-30-2005, 08:22 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts