INNER CODE UNIT · Java

getHTTPTime

proninyaroslav/libretorrent · app/src/main/java/org/nanohttpd/NanoHTTPD.java:199

        public static String getHTTPTime(int days) {
            Calendar calendar = Calendar.getInstance();
            SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
            dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
            calendar.add(Calendar.DAY_OF_MONTH, days);
            return dateFormat.format(calendar.getTime());
        }
        private final String n, v, e;
        public Cookie(String name, String value) {
            this(name, value, 30);
        }
        public Cookie(String name, String value, int numDays) {
            this.n = name;
            this.v = value;
            this.e = getHTTPTime(numDays);
        }
        public Cookie(String name, String value, String expires) {
            this.n = name;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…