Java Millisecond Convert getNice(long timeMillisecGMT)

Here you can find the source of getNice(long timeMillisecGMT)

Description

Return nice given MMILIS since EPOCH

License

Open Source License

Parameter

Parameter Description
timeMillisecGMT a parameter

Declaration

public static String getNice(long timeMillisecGMT) 

Method Source Code

//package com.java2s;
/*****************************************************************************
 * Source code information//from w  w  w.jav a 2  s.  co m
 * -----------------------
 * Original author    Luis Bermudez, SURA
 * Author email       bermudez@sura.org
 * Package            org.oostethys.netcdf.util
 * Web                http://marinemetadata.org/mmitools
 * Created            Dec 4, 2006
 * Filename           $RCSfile: TimeUtil.java,v $
 * Revision           $Revision: 1.2 $
 *
 * Last modified on   $Date: 2008/06/19 19:47:44 $
 *               by   $Author: luisbermudez $
 *
 * (c) Copyright 2005, 2006 Monterey Bay Aquarium Research Institute
 * Marine Metadata Interoperability (MMI) Project http://marinemetadata.org
 *
 * License Information
 * ------------------------
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, you can download it from 
 *  http://marinementadata.org/gpl or write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *********************************************************************************/

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

public class Main {
    /**
     * Return nice given MMILIS since EPOCH
     * 
     * @param timeMillisecGMT
     * @return
     */
    public static String getNice(long timeMillisecGMT) {

        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        format.setTimeZone(TimeZone.getTimeZone("GMT"));
        return format.format(new Date(timeMillisecGMT));

    }
}

Related

  1. convertToMilliseconds(String value)
  2. getDuration(final long millis)
  3. getDurationBreakdown(long durationInMillis)
  4. getDurationMillisecond(Date date1, Date date2)
  5. getHumanDisplayForTimediff(Long diffMillis)
  6. getStringFromMillis(long timestamp)
  7. getTime(long millis)
  8. getTime(long time, boolean withMilliseconds)
  9. getTimeByMillis(long now)