Home  >  Article  >  Backend Development  >  What I have to say about virtualbox and Tencent Pigeon

What I have to say about virtualbox and Tencent Pigeon

WBOY
WBOYOriginal
2016-07-25 08:46:171084browse

Virtualbox and Tencent Pigeon have to say, friends in need can refer to it.


What I have to say about virtualbox and Tencent Pigeon

At first, I wanted to reference Tencent Pigeon’s API in the PHP unit test in virtualbox and do unit testing to implement push. I thought it would be easy...

Condition

The code in the unit test is as follows

  1. public function testXg(){
  2. $re = XingeApp::PushTokenAndroid('my appid', 'my secretkey', 'title', 'Hi everyone!', 'fake token');
  3. $ this->assertEquals(40,$re['ret_code']);
  4. }
Copy code

The result: the error code returned: -2 (invalid timestamp, an error will occur if the difference is more than 600 seconds from the current Beijing time), I was shocked at the time..

solve

I won’t go into the process, the reason is the time synchronization problem between the host and virtualbox
Finally, write

in the command line

VBoxManage setextradata virtual guest name “VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled” “0″

Solution... pitfall...

virtualbox


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn