By Tolis Papastolopoulos | EURACTIV.com 11-08-2022 1200px-Grosser_Panda Print Email Facebook Twitter LinkedIn WhatsApp Telegram You need to use javascript because you want the value of time from the client. PHP is a server-side language that evaluates on the server and sends results to the client. So if you try to pull a date/time using a PHP function, it’s going to pull the date from the server, which is not always in the client’s timezone.