Examples of toGMTString()


Examples of java.util.Date.toGMTString()

  @SuppressWarnings("deprecation")
  @Test
  public void confirmDateUtil() throws DateParseException {
    Date date = DateUtils.parseDate("Sun, 09 Aug 2009 01:56:14 GMT");
    assertEquals("9 Aug 2009 01:56:14 GMT", date.toGMTString());
  }

  @Test
  public void confirmConcurrentLinkedQueueOfferSemantics() {
    ConcurrentLinkedQueue<String> queue = new ConcurrentLinkedQueue<String>();
View Full Code Here

Examples of java.util.Date.toGMTString()

                              theHeaders = "Subject: (No Subject)" + "\r\n" + theHeaders;
                      }
                                                                    }
                    /* Add the time the server processed this SEND command. */
                    Date rightNow = new Date();
                    theHeaders = theHeaders + "\r\n" + "Posted: " + rightNow.toGMTString();
                    if (receivedSubject.equals("")) {
                      theItem = theTopic.addItem("(No Subject)", theHeaders, messageData);
                    } else {
                      theItem = theTopic.addItem(receivedSubject, theHeaders, messageData);
                    }
View Full Code Here

Examples of java.util.Date.toGMTString()

  public synchronized void InsertSystemMessage(String Subject, String body) {
    OQServer.report(OQServer.repDebugMinor, "Inserting system message. " + Subject);
    OQItem theItem;
    String theHeaders = new String ("Subject: " + Subject);
    Date rightNow = new Date();
    theHeaders = theHeaders + "\r\n" + "Posted: " + rightNow.toGMTString();
    theItem = addItem(Subject, theHeaders, body);
  }

  public boolean userHasReadPermission(OQUser aUser) {
    if ((readFlags & 8) == 8) {  // world
View Full Code Here

Examples of java.util.Date.toGMTString()

    if (GWT.isScript()) {
      // /////////////////////////////
      // Past
      // /////////////////////////////
      Date accum1 = create(PAST);
      String a1 = accum1.toGMTString();
      assertEquals("5 Jan 1880 00:00:00 GMT", a1);

      // /////////////////////////////
      // Future
      // /////////////////////////////
View Full Code Here

Examples of java.util.Date.toGMTString()

      // /////////////////////////////
      // Future
      // /////////////////////////////
      Date accum2 = create(FUTURE);
      String a2 = accum2.toGMTString();
      assertEquals("30 Dec 2030 03:04:05 GMT", a2);
    }
  }

  /** Testing for public java.lang.String java.util.Date.toLocaleString(). */
 
View Full Code Here

Examples of java.util.Date.toGMTString()

  }

  private static  void checkUTC(Date d0, byte[] b, String text) throws Exception {
    Date d1 = decodeUTC(b);
    if( !d0.equals(d1) ) {
      throw new Exception("UTCTime " + text + " failed: " + d1.toGMTString());
    } else {
      System.out.println("UTCTime " + text + " ok");
    }
  }
View Full Code Here

Examples of java.util.Date.toGMTString()

  }

  private static  void checkGeneralized(Date d0, byte[] b, String text) throws Exception {
    Date d1 = decodeGeneralized(b);
    if( !d0.equals(d1) ) {
      throw new Exception("GeneralizedTime " + text + " failed: " + d1.toGMTString());
    } else {
      System.out.println("GeneralizedTime " + text + " ok");
    }
  }
View Full Code Here

Examples of java.util.Date.toGMTString()

    }
  }

  public static void main(String args[]) throws Exception {
    Date d0 = new Date(TIME);
    System.out.println(d0.toGMTString());

    checkUTC(d0, UTC_ZULU, "Zulu");
    checkUTC(d0, UTC_PLUS1, "+0100");
    checkUTC(d0, UTC_MINUS1, "-0100");
View Full Code Here

Examples of java.util.Date.toGMTString()

  public void setDateHeader(String name, long value) {
    Date date = new Date(value);
//    DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
//    dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
//    ;
    response.setProperty(name,date.toGMTString());
  }

  /* (non-Javadoc)
   * @see org.ajax4jsf.resource.ResourceContext#getOutputStream()
   */
 
View Full Code Here

Examples of java.util.Date.toGMTString()

  @Override
  public void setDateHeader(String name, long value) {
    if (null != portletResponse) {
      Date date = new Date(value);
      portletResponse.setProperty(name, date.toGMTString());
    }
  }
 
  @Override
  public OutputStream getOutputStream() throws IOException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.