The simplest way that I achive this is:
SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", Locale.getDefault() ).format(System.currentTimeMillis())