用户需要在本地时间显示交易,因为他们从不同的国家登录. [英] User needs to display transaction in there local time as they login from different country.

查看:32
本文介绍了用户需要在本地时间显示交易,因为他们从不同的国家登录.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我的 java web 应用程序部署在美国,无论客户的国家/地区如何,我都会获得美国时间.但如果客户在印度,他应该使用时区或区域设置或用户偏好获取印度时间.我该怎么办?

If my java web application is deployed in the US I will get US time regardless of the client's country. But if the client is in India, he should get Indian time, either using the time zone or locale or user preference. What should I do?

谁能帮帮我.

推荐答案

通过用户 IP 地址确定国家(使用一些 网络服务或任何特殊的本地图书馆).如果是印度,则根据相应的时区显示时间.

Determine country by user IP address (using some web service or any special local library). And display the time according to appropriate time zone if it's India.

这篇关于用户需要在本地时间显示交易,因为他们从不同的国家登录.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆