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
Adding Javascript to a button
Raise domain function level when there are 2 ADs
Export data from Access to a .txt file, tab delimited, with short date and short time format
How do I in code behind scroll to an object
What Information has to be used for UCC cert for Exchange 2007
updating entourage anywhere equivalent certificate
DVD +R vs DVD -R, CD +R vs CD -R
BlazeDS Service Call Returns Null
I have two kids...
Auto Hide Table Columns