PHP date_timestamp_set() လုပ်ဆောင်ချက်
ဥပမာ
Unix အချိန်တံဆိပ်ပေါ်တွင် အခြေခံ၍ ရက်စွဲနှင့် အချိန်ကို သတ်မှတ်ပါ-
<?php
$date=date_create();
date_timestamp_set($date,1371803321);
echo date_format($date,"U = Y-m-d H:i:s");
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
date_timestamp_set() လုပ်ဆောင်ချက်သည် Unix အချိန်တံဆိပ်ပေါ်တွင် အခြေခံ၍ ရက်စွဲနှင့် အချိန်ကို သတ်မှတ်ပေးပါသည်။
အထားအသို
date_timestamp_set(object, unixtimestamp)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create(). This function modifies this object |
unixtimestamp | Required. Specifies a Unix timestamp representing the date |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | method chaining အတွက် DateTime object ကို ပြန်ပေးသည်။ ရှုံးနိမ့်မှုအပေါ် မှားသည်။ |
---|---|
PHP ဗားရှင်း- | 5.3+ |
❮ PHP နေ့စွဲ/အချိန် အကိုးအကား