Ben gün, ay ve yıl almak için date () işlevini kullanın.
$year = date(y);
$month = date(m);
$day = date(d);
But my hosting is in another place where I am, so I need to add 11 hours. could you tell me how can I do that? thanks
Ya yok
date('Y-m-d', strtotime('+11 hours'));
11 saat eklemek veya bir DateTime nesnesi oluşturmak ve gerektiğinde bu zaman dilimi bulunuyor değiştirmek için
$datetime = new DateTime; // current time = server time
$otherTZ = new DateTimeZone('America/Los_Angeles');
$datetime->setTimezone($otherTZ); // calculates with new TZ now
ya da sadece ile uygun zaman dilimini
İstediğiniz ne zaman dilimini ayarlamak için http://www.php.net/manual/en/function.date-default-timezone-set.php kullanabilirsiniz