如何从请求对象获取客户端时间。没有 JavaScript
我想在Web应用程序中使用客户端计算机的时间。有没有办法从 HttpServletRequest 获取用户时间?我无法使用任何 JavaScript 或客户端脚本,因为此 Web 应用程序适用于不支持脚本的低端手机。谢谢。
I want to use the time of client machine in Web application. Is there any way to get user time from HttpServletRequest
? I can't use any javascript or client side scripting, as this web application is for lower end mobile phones, which do not support scripting. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您查看客户端发出的原始请求,您会发现通常不会随请求发送客户端时间戳。
这意味着您必须将时间信息添加到客户端的请求中,以使其在服务器端可用。
If you look at the raw request made by the client you will see that in general no client timestamp is sent with the request.
This means that you have to add the time information to your request on the client side to make it available on the server side.
您所追求的可能是不可能的,如 this< /a> 之前的 SO 线程:
What you are after might not be possible, as stated in this previous SO thread: