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
VBA code to loop through a process for importing EXISTING excel files.
Retore from Tape
Internet Explorer Content Advisor with Group Policy
php upload and insert into database not working
How do I find the hard drive requirments for a SAN?
PIX 515E and ACS - limit active VPN session time?
Hide vb.net exe from tasklist
Tracking cookies while NOT surfing - yieldmanager.com, atdmt.com, serving-sys.com
What is the impact of recreating an OU certifier on current users?
Migrate a Cisco Router-On-A-Stick type of network