I want to convert my Date timezone from local setting to say Zulu.
First of all Date class does not support setting of TimeZone [method is depricated.]
I have found a way to change the timeZone, but I am not very sure if its the best way to change the TimeZone.
Following is the code which currently works fine.
I am not comfortable with the idea of first getting
String and then actually getting the changed date.
Is there any better way to change the TimeZone ???
Thanks in advance.
This following program is my
test program, in case if one wants to run the code.