How do I return the current time in PHP for the PST timezone? -
I have to set the command to your friends (using Naitbot the Tvib) and it can not detect how Print time is currently
I tried to use it:
& lt ;? Php $ date = date_create (zero, timezone_open ('America / Los_Ageilles')); $ Tz = date_timezone_get ($ date); Echo date ("h: i", time ()); ? & Gt;
This gives current server time (I'm doing a lot) rather than the timezone I've chosen.
I have used many different things but none of them work. They either do not display anything, or display the wrong time.
NULL to get the current time in Date Time () class -
$ date = New date time (empty, new date timezone ('America / Los_Angels')); Echo $ date-> Format ('h: i'); Enter
null
Note Docs :: using the $ timezone parameter.
Comments
Post a Comment