Current Time shows wrongly at Route Action

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
thomas
User
Posts: 137

Current Time shows wrongly at Route Action

Post by thomas »

function Route_Action($app){
$app->get('/request/{token}/{id}/{cmd}', function ($request, $response, $args) {
echo CurrentTime();
exit();
});
}

Here I get the wrong Time
but on other page the CurrentTime(); shows the correct time.


arbei
User
Posts: 9787

Post by arbei »

You need to call Language() first so that the language object and the timezone will be loaded.


thomas
User
Posts: 137

Post by thomas »

Thanks

It is working now.

I want to call the "request" only from one domain i.e. http://mydomain.com
How can I block all other access for security.


arbei
User
Posts: 9787

Post by arbei »


Post Reply