Microsoft
Software
Hardware
Network
Question : java get utc date/time
I need to get the UTC/GMT current date/time. I'm using the below and it adds "-0700" at then end...is this code valid?
private String getCurrentDate(){
Calendar cal = new GregorianCalendar();
cal.setTimeZone(TimeZone.g
etTimeZone
("GMT"));
DateFormat formatter = new SimpleDateFormat("yyyy-MM-
dd'T'HH:mm
:ssZ");
return formatter.format(cal.getTi
me());
}
result of above is 2010-05-19T16:39:15-0700
Answer : java get utc date/time
take the Z out of the date format string
Random Solutions
Install Office Pro 2003 and 2007
Send Outlook Contact Automatic Update
sun have an warrenty check site like dell
Excel macro that would delete rows if ID numbers match
Best way to map network drives
byref argument type mismatch error vba
XP computer won't run windows updates after virus cleanup
syntax to create URL links from flash
JNLP Applet in ASP.net IIS 7
vSphere Client hangs when resetting VM, some times