0

Currently, I am getting TimeZone in String. How can I convert it back to TimeZone ??

String timeZone = "Europe/Berlin"

How can I cast this to java.util.TimeZone

kandarp
  • 991
  • 1
  • 14
  • 35

1 Answers1

2

By using the getTimeZone static method:

java.util.TimeZone.getTimeZone("Europe/Berlin")
Alex Shesterov
  • 26,085
  • 12
  • 82
  • 103