I have parsed a java.util.Date
from a String
but it is setting the local time zone as the time zone of the date
object.
The time zone is not specified in the String
from which Date
is parsed. I want to set a specific time zone of the date
object.
How can I do that?
You could also set the timezone at the JVM level
output:
Convert the Date to String and do it with SimpleDateFormat.