I am having a String myString = "Asia/kolkata";
I need to set TimeZone.setDefault(myString);
I have tried as mentioned above. But String cannot be given in TimeZone parameter.
How to set this?
You use TimeZone.getTimeZone(String)
to get the time zone, then you can set that as the default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With