Here you can find the source of getNow()
public static String getNow()
//package com.java2s; //License from project: Apache License import java.text.*; import java.util.*; public class Main { private static final DateFormat FORMATTER = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); public static String getNow() { return FORMATTER.format(Calendar.getInstance().getTime()); }//from w w w . ja v a2 s . c o m }