I have a GregorianCalendar time that comes from a web service, when I print it i get it in this format:
java.util.GregorianCalendar[time=1359074696474,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="UTC",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2013,MONTH=0,WEEK_OF_YEAR=4,WEEK_OF_MONTH=4,DAY_OF_MONTH=24,DAY_OF_YEAR=24,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=4,AM_PM=1,HOUR=7,HOUR_OF_DAY=19,MINUTE=44,SECOND=56,MILLISECOND=474,ZONE_OFFSET=-18000000,DST_OFFSET=0]
and I need it in this format:
2011-10-24T06:37:12.121Z
Does anyone know how to parse the GregorianCalendar to that format using UTC Time Zone ?