<@UES7JHLPM>. First of all, you are mixing apples ...
# cfml-general
d
@gsr. First of all, you are mixing apples and oranges. You have the first statement in CF (Server) however everything else is in Javascript which in the case is your local machine (Client). In order get the server date/time, just print the variable 'n'. If you want to that that value in Javascript, set a variable to the value of 'n' and go from.
g
it shows same date, even the servers are in uk right now
managed to do this but its not a live clock for both
Copy code
var localTime = new Date();

  document.getElementById('localtime').innerHTML = 'Local machine time is: ' + localTime + '<br>';

    $.ajax({

        type: "GET",

        url: 'serverTime.cfm',

        success: function(response) {

            document.getElementById('servertime').innerHTML = 'Server machine time is: ' + response + '<br>';

        }  

    });
i waqnt it as a live clock
managed to do with setInterval but how to display server time as: [2:21 PM] Gurpreet Randhawa Sun Nov 06 2022 142047 GMT-0400 (Atlantic Standard Time)