My Server has different time zone and I want to access my website from different timezone. So I want to display time in website according to system from which I will open website not want to set time according to server timezone. Is there any way to solve my problem? Please help me. Thanks in Advance.
Asked
Active
Viewed 58 times
0
-
You can use javascript for it, `var date= new Date();` and set the value to your HTML element. refer http://stackoverflow.com/questions/3552461/how-to-format-a-javascript-date for more details – Irshu May 24 '16 at 05:46
-
Indeed, the usual answer is to transfer the value from the server in a machine-readable format and in UTC, then do both time zone conversion and formatting on the client. – Jon Skeet May 24 '16 at 05:47
-
you can use javascript,jquery,ajax – senthilkumar2185 May 24 '16 at 06:21
1 Answers
0
You can use javascript for same. Add below code in your html (design) page
var currentdate = new Date()
This will give you current Date-time at end users machine.
var offset = currentdate .getTimezoneOffset()
This will give you current time zone offset with actual GMT time.
Using this value you can also identify the End-users time zone.

Ashish Sapkale
- 540
- 2
- 13