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
What is the best setup of disk partitions for a Windows Server box (2003)
Don't refresh Master page content
How do I setup "completely" Unsolicited Remote Assistance Requests in Windows 7 for remote support? - Replacing free VNC
How do i force notepad as the html editor across my network using group policy?
E-Machines EL1200 BSOD at Startup - Windows XP SP2
java.lang.OutOfMemoryError
- CFQUERY
Current version of C#?
Change tab color if tab name appears in list
How to edit pdf in Adobe Pro 9
Troubleshooting slow server