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
Problem passing child data to parent window
SCP Backup without overwriting and copying from remote to local
Windows Server 2008 RS Remote Desktop Service Long Logoff time
What is the equivalent of html anchor control's name attribute in asp.net Hyperlink control
Best way to copy SQL record using VB6
Background Image Not Showing
PHP - mail function does NOT work on Window account. Need Help Sending Mail Using SMTP
Spit tunneling problem
My browser is contantly being redirected to phony sites
Exchange 2007 retrieve messages from disconnected mailbox