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
Filling a dataset without locking the database?
Change div position when checkbox is checked/unchecked
How do I extract characters after a hypen in query?
how to set up a countdown timer using an animated GIF?
Dynamically show all of gridview and expand page
Question on Fiber runs
Adding a second wifi router to an existing small office network
Reinstalling new xcode, but need to remove current one for the room
Export Access to Excel format spreasdsheets
Trouble Converting SQL Server Query to MS Access