Here you can find the source of now()
public static final String now()
//package com.java2s; /******************************************************************************* * Copyright (c) 2013 Jens Kristian Villadsen. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html/*from w w w . jav a 2s .com*/ * * Contributors: * Jens Kristian Villadsen - Lead developer, owner and creator ******************************************************************************/ import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { private final static SimpleDateFormat formatter = new SimpleDateFormat( "EEE, d MMM yyyy hh:mm:ss z", Locale.US); /** * Returns the current Date/Time in "iTunes time format" */ public static final String now() { return formatter.format(new Date()); } }