How to detect Time Zone(city) and correctly show individual local time? [message #1403481] |
Thu, 24 July 2014 05:52 |
David Lee Messages: 78 Registered: May 2013 |
Member |
|
|
Hi, you all,
Q1: How to detect the Time Zone(City) of the client?
Description : In order to know what city the user is in, such as New York/Tokyo and so on.
Q2: How to automatically convert the time difference?
Description : In case the RAP application server is in Tokyo, the timestamp column will record a datetime like 2014-07-24 14:00:00.000000+09 in Tokyo, but the user in New York is supposed to see the corresponding time 2014-07-24 01:00:00.000000-05.
Thank you!
Best Regards,
David
[Updated on: Thu, 24 July 2014 05:53] Report message to a moderator
|
|
|
|
Re: How to detect Time Zone(city) and correctly show individual local time? [message #1403661 is a reply to message #1403489] |
Fri, 25 July 2014 01:05 |
David Lee Messages: 78 Registered: May 2013 |
Member |
|
|
Hi, Ivan,
Thank you for your quick reply.
I tried API ClientInfo, it does provide the locale and time offset, but what I need is to get the real Timezone ID of a client user, the Timezone ID is exactly in the format of like 'Asia/Tokyo' 'America/Los_Angeles' and so on. In other words, I want to know where the client user is, the location in the form of like 'America/Los_Angeles'!
Just like RWT.getRequest().getRemoteAddr() can easily get the client user's IP, is there an API that can get the client user's Timezone ID?
Best Regards,
David
[Updated on: Fri, 25 July 2014 01:21] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03341 seconds