Examples of americaLosAngeles()


Examples of com.google.gwt.i18n.client.constants.TimeZoneConstants.americaLosAngeles()

  @SuppressWarnings("deprecation")
  public void testDynamicTimeZone() {
    TestAnnotatedMessages m = GWT.create(TestAnnotatedMessages.class);
    Date date = new Date(Date.UTC(2010 - 1900, 1, 2, 3, 4, 5));
    TimeZoneConstants timeZoneData = GWT.create(TimeZoneConstants.class);
    String str = timeZoneData.americaLosAngeles();
    TimeZoneInfo tzInfo = TimeZoneInfo.buildTimeZoneData(str);
    TimeZone tz = TimeZone.createTimeZone(tzInfo);
    assertEquals("in timezone: 2/1/2010, 7:04:05 PM", m.inTimezone(date, tz));

    assertEquals("in timezone: 2/1/2010, 7:04:05 PM", m.inTimezoneAsSafeHtml(date, tz).asString());
View Full Code Here

Examples of com.google.gwt.i18n.client.constants.TimeZoneConstants.americaLosAngeles()

  public void test_daylightTimeTransition() {
    // US PST transitioned to PDT on 2006/4/2 2:00am, jump to 2006/4/2 3:00am.
    // That's UTC time 2006/4/2 10:00am

    TimeZoneConstants timeZoneData = GWT.create(TimeZoneConstants.class);
    String str = timeZoneData.americaLosAngeles();
    TimeZone usPacific = TimeZone.createTimeZone(str);

    Date date = new Date();
    date.setTime(Date.UTC(2006 - 1900, 3, 2, 9, 59, 0));
    assertEquals("04/02/2006 01:59:00 PST", DateTimeFormat.getFormat(
View Full Code Here

Examples of com.google.gwt.i18n.client.constants.TimeZoneConstants.americaLosAngeles()

  public void test_predefinedFormat() {
    Date date = new Date(2006 - 1900, 7, 4, 13, 49, 24);

    TimeZoneConstants timeZoneData = GWT.create(TimeZoneConstants.class);
    String str = timeZoneData.americaLosAngeles();
    TimeZone usPacific = TimeZone.createTimeZone(TimeZoneInfo.buildTimeZoneData(str));

    String fullDateFormat = DateTimeFormat.getFullDateFormat().format(date);
    assertEquals("Friday, August 4, 2006", fullDateFormat);
View Full Code Here

Examples of com.google.gwt.i18n.client.constants.TimeZoneConstants.americaLosAngeles()

    assertEquals("999", DateTimeFormat.getFormat("SSS").format(date));
  }

  public void test_timezonev() {
    TimeZoneConstants timeZoneData = GWT.create(TimeZoneConstants.class);
    String str = timeZoneData.americaLosAngeles();
    TimeZone usPacific = TimeZone.createTimeZone(str);

    Date date = new Date();
    date.setTime(Date.UTC(2006 - 1900, 6, 27, 13, 10, 10));
View Full Code Here

Examples of com.google.gwt.i18n.client.constants.TimeZoneConstants.americaLosAngeles()

            usPacific));
  }

  public void test_timezonez() {
    TimeZoneConstants timeZoneData = GWT.create(TimeZoneConstants.class);
    String str = timeZoneData.americaLosAngeles();
    TimeZone usPacific = TimeZone.createTimeZone(str);

    Date date = new Date();
    date.setTime(Date.UTC(2006 - 1900, 6, 27, 13, 10, 10));
View Full Code Here

Examples of com.google.gwt.i18n.client.constants.TimeZoneConstants.americaLosAngeles()

    assertEquals(date, format.parse(format.format(date)));
  }

  public void test_timezoneZ() {
    TimeZoneConstants timeZoneData = GWT.create(TimeZoneConstants.class);
    String str = timeZoneData.americaLosAngeles();
    TimeZone usPacific = TimeZone.createTimeZone(str);

    Date date = new Date();
    date.setTime(Date.UTC(2006 - 1900, 6, 27, 13, 10, 10));
View Full Code Here

Examples of com.google.gwt.i18n.client.constants.TimeZoneConstants.americaLosAngeles()

  }

  public void testGetters() {
    final TimeZoneConstants timeZoneConstants = GWT.create(TimeZoneConstants.class);
    TimeZone usPacific =
      TimeZone.createTimeZone(TimeZoneInfo.buildTimeZoneData(timeZoneConstants.americaLosAngeles()));
   
    assertEquals(480, usPacific.getStandardOffset());
    assertEquals("America/Los_Angeles", usPacific.getID());
  }
View Full Code Here

Examples of com.google.gwt.i18n.client.constants.TimeZoneConstants.americaLosAngeles()

    // the time zone to which they pertain -- trying to create them by
    // directly manipulating Date objects was making our tests fail when run in
    // timezones outside of California.
   
    TimeZoneConstants timeZoneData = GWT.create(TimeZoneConstants.class);
    String str = timeZoneData.americaLosAngeles();
    TimeZone usPacific = TimeZone.createTimeZone(TimeZoneInfo.buildTimeZoneData(str));
   
    DateTimeFormat fmt = DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_LONG);
   
    Date dateMarchBefore = fmt.parse("March 11, 2007 at 01:00:00 AM GMT-800");
View Full Code Here

Examples of com.google.gwt.i18n.client.constants.TimeZoneConstants.americaLosAngeles()

 
  @SuppressWarnings("deprecation")
  public void testNames() {
    final TimeZoneConstants timeZoneConstants = GWT.create(TimeZoneConstants.class);
    TimeZone usPacific = TimeZone.createTimeZone(
        TimeZoneInfo.buildTimeZoneData(timeZoneConstants.americaLosAngeles()));
    Date dt = new Date(2007 - 1900, 7 - 1, 1);
    assertTrue(usPacific.isDaylightTime(dt));
    assertEquals("PDT", usPacific.getShortName(dt));
    assertEquals("Pacific Daylight Time", usPacific.getLongName(dt));
   
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.