All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.antstreaming.rtsp.session.DateUtil Maven / Gradle / Ivy

Go to download

Ant Media Server supports RTMP, RTSP, MP4, HLS, WebRTC, Adaptive Streaming, etc.

There is a newer version: 2.10.0
Show newest version
package com.antstreaming.rtsp.session;

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

public class DateUtil {

  public static String getGmtDate() {
    DateFormat df = new SimpleDateFormat("d MMM yyyy HH:mm:ss z", Locale.ENGLISH);
    df.setTimeZone(TimeZone.getTimeZone("GMT")); // modify Time Zone.
    return (df.format(new Date()));
  }

  public static void main(String[] args) {
    System.out.println(getGmtDate());
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy