Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java. Creating a date according to user timezone in web-application

I have a Java web-application. In some places there is showing of dates. I want to display the date according to user timezone. How do I create a date for the show if I know the timezone the user? I use the class Date. Any help would be greatly appreciated.

like image 872
Michael Avatar asked Apr 29 '26 05:04

Michael


1 Answers

There is no standard way to do this. On client side, you may capture time using Java script and send that information to the server. On server side, you can covert the time to Coordinated Universal Time.

like image 60
ring bearer Avatar answered Apr 30 '26 21:04

ring bearer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!