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.

Date Time () class -

  $ date = New date time (empty, new date timezone ('America / Los_Angels')); Echo $ date-> Format ('h: i'); Enter  

NULL to get the current time in null Note Docs :: using the $ timezone parameter.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -