php - Change now() function's timezone -
I want to keep my country time in the The timestamp should be returned in the current timezone as set on your system. If you can not change the time zone of the system, you may need to manipulate PHP / Ruby / Time before saving it, or you can save time by using reg_date area in my DB table. But
now () sets the time of the server How can the timing of the
now () function change for Azerbaijan (UTC +04.00)?
UNIX_TIMESTAMP (). You can choose the option . Using code (PHP) (5.3+) to manipulate the time zone before
INSERT ING in the database:
// .... some predecessor items $ date = new dateTime (); $ Date-> Set timezone (new datetime zone ('Asia / Baku')); $ Fdate = $ date- & gt; Format ('Y-M-DH: I: S'); // Now format the form now () $ query = "TBL (field, built-on) values ('bla', '$ fdate')"; Mysqli_query ($ query); // ... and so on
Comments
Post a Comment