JS和PHP日期/时间(夏令时)

Ok, so there is a couple of questions in here all relating to the way JS & PHP handle dates for different timezones.

Now, I was under the impression that JS uses the clients System Time, however, I am based in the UK and the current time is 21:12 but the JS new Date() function is showing 20:12. Now this is down to daylight savings. My first question is this:

Can JS detect timezones and adjust the time accordingly? My app is to be used in various countries and the use of the date is a check to see when the last search was done and check if any new results have been added since then.

My second question is if the above is too difficult/complicated I could always do the processing in PHP on the server side. Currently the JS is passing the time as a unix timestamp and PHP is then converting it to the MYSQL time to query the database. So what could do in PHP to ensure that the correct time is being passed to the query?

JS can detect local time. You can use Date().getTimezoneOffset() to calculate timezone difference between UTC and Local Time.

You can read more about it here