Server Time vs Local Time
This example gives the closest server time that you are using:
var serverTime = new Date();
var hours = serverTime.getHours();
I need the local computer time for Timezone calculations:
var localTime = ?;
var hours = localTime.getHours();
Last edited by Philosophaie; 04-06-2014 at 04:50 PM.
The Date() function always creates a date object based on the user's local computer time.
The Date() object relies on the user's computer clock, not the server. So you have the local computer time and you can check getGMTOffset or getTimezoneOffset as needed for any conversions.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)