diff options
author | Leonard Hecker <leonard@hecker.io> | 2018-07-20 22:03:00 +0200 |
---|---|---|
committer | Paul Yang <TeBoring@users.noreply.github.com> | 2018-07-20 13:03:00 -0700 |
commit | e7746f487cb9cca685ffb1b3d7dccc5554b618a4 (patch) | |
tree | 851e32ef5032765a8ad61c30b212aefc5f12703a /php/tests/memory_leak_test.php | |
parent | 656f64ec0b5dff6816886d66a0124ab4f8d1fd4b (diff) | |
download | protobuf-e7746f487cb9cca685ffb1b3d7dccc5554b618a4.tar.gz protobuf-e7746f487cb9cca685ffb1b3d7dccc5554b618a4.tar.bz2 protobuf-e7746f487cb9cca685ffb1b3d7dccc5554b618a4.zip |
php: Added nanosecond support for Timestamp (#3972)
* php: Added nanosecond support for Timestamp
* php: Fixed compatibility test
Diffstat (limited to 'php/tests/memory_leak_test.php')
-rw-r--r-- | php/tests/memory_leak_test.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/php/tests/memory_leak_test.php b/php/tests/memory_leak_test.php index 4e3874b7..f3bcb963 100644 --- a/php/tests/memory_leak_test.php +++ b/php/tests/memory_leak_test.php @@ -152,7 +152,7 @@ date_default_timezone_set('UTC'); $from = new DateTime('2011-01-01T15:03:01.012345UTC'); $timestamp->fromDateTime($from); assert($from->format('U') == $timestamp->getSeconds()); -assert(0 == $timestamp->getNanos()); +assert(1000 * $from->format('u') == $timestamp->getNanos()); $to = $timestamp->toDateTime(); assert(\DateTime::class == get_class($to)); |