datetime - php: setting a timezone by UTC offset -


I know that my user's timezone is UTC +3

I want to create a date object with knowledge:

  $ usersNow = new date time ('now', new datetime zone ("+ 3"));   

I get a respsonse as:

  'Unknown or Bad Timezone (+2)'   < P> What am I doing wrong? How can I decide?   

how about this ...

  $ original = new Date time ("now", new datetime zone ('UTC')); $ Timezone name = timezone_name_frame_parab ("", 3 * 3600, wrong); $ Revised = $ original- & gt; Settime time zone (new date time zone ($ namename));    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -