Guest User

Untitled

a guest
Jan 17th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. $value = $timeRec->format('Y-m-d H:i:s');
  2.  
  3. $value = new DibiDateTime($value);
  4.  
  5. public function __construct($time = 'now', DateTimeZone $timezone = NULL)
  6. {
  7. if ($timezone === NULL) {
  8. parent::__construct($time);
  9. }
  10. }
  11.  
  12. $time = DateTime::createFromFormat('Y-m-d-h.i.s.u', '2010-12-15-10.23.22.716000');
  13. var_dump($time);
  14.  
  15. object(DateTime)[1]
  16. public 'date' => string '2010-12-15 10:23:22' (length=19)
  17. public 'timezone_type' => int 3
  18. public 'timezone' => string 'UTC' (length=3)
Add Comment
Please, Sign In to add comment