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
Programmatic Access Security (Outlook 2007)
Subnets
Where is the db connection info located?
php session variable lifecycle
Need to send mail through an authenticated smarthost in Exchange 2007/2003
What's the fastest way to do a wherein query in linq2sql
Change additional 32-bit printer drivers - SBS 2008
Changing Background colors for a column based on contents of cell
What is the best way to have a website accessible to iPhones?
Looking for bicycle cadence indicator using colored LEDs to show speed