I want to know the current time of the machine from which a request is made to my api written in java. Is it possible to do that using some function of HttpServletRequest?
Asked
Active
Viewed 329 times
1 Answers
0
No! Not using the java api request as requests are created by users .But if you have a UI application sending requests to java application that application can get the client machine's date & your Ui code can send this date in request.
var currentDate = new Date();
you can format and send the date now to server.

Vinay Prajapati
- 7,199
- 9
- 45
- 86