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
delay notifications from AOL and GT.RR.COM, exchange 2003
How to create PDF files from .Net application without needing Acrobat installed
64 bit application will not connect to 32 bit Office 2003 MS Access on a Windows XP 64 bit PC
Cannot Access Application Data
SharePoint 2010 search service always been disabled
SCSI Tape Error 80000
Which facility to select within Windows environment
Migrating WSUS repository directory into different drive
SQL Insert Statement
Asterisk Chanspy and G729 License Issue