Page 1 of 1
Current Time shows wrongly at Route Action
Posted: Thu Aug 22, 2024 2:02 am
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.
Re: Current Time shows wrongly at Route Action
Posted: Thu Aug 22, 2024 8:21 am
by arbei
You need to call Language()
first so that the language object and the timezone will be loaded.
Re: Current Time shows wrongly at Route Action
Posted: Thu Aug 22, 2024 10:21 am
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.
Re: Current Time shows wrongly at Route Action
Posted: Thu Aug 22, 2024 5:24 pm
by arbei