A
ahjiang
Hi all,
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd
HH:mm:ss z");
java.util.Date date = new java.util.Date();
System.out.println(dateFormat.format(date));
I having this piece of code and the output is
2006-05-11 02:54:00 GMT
My location is GMT +8. So i would need to add in another 8 hrs to the
time.
How can i do it such that the piece of code would always offset the
time correctly?
Appreciate any help
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd
HH:mm:ss z");
java.util.Date date = new java.util.Date();
System.out.println(dateFormat.format(date));
I having this piece of code and the output is
2006-05-11 02:54:00 GMT
My location is GMT +8. So i would need to add in another 8 hrs to the
time.
How can i do it such that the piece of code would always offset the
time correctly?
Appreciate any help