source: src/router/php7/ext/date/tests/date_time_fractions_create_from_format.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 3 months ago

update php

File size: 597 bytes
Line 
1--TEST--
2Fractions with DateTime objects (create_from_format)
3--INI--
4date.timezone=UTC
5--FILE--
6<?php
7$dt = date_create_from_format( "Y-m-d H:i:s.u", "2016-10-03 12:47:18.819313" );
8var_dump( $dt );
9
10$dt = date_create_from_format( "U.u", "1475500799.176312" );
11var_dump( $dt );
12?>
13--EXPECTF--
14object(DateTime)#%d (%d) {
15  ["date"]=>
16  string(26) "2016-10-03 12:47:18.819313"
17  ["timezone_type"]=>
18  int(3)
19  ["timezone"]=>
20  string(3) "UTC"
21}
22object(DateTime)#%d (%d) {
23  ["date"]=>
24  string(26) "2016-10-03 13:19:59.176312"
25  ["timezone_type"]=>
26  int(1)
27  ["timezone"]=>
28  string(6) "+00:00"
29}
Note: See TracBrowser for help on using the repository browser.