Code example for TimeZone

Methods: getOffset

0
  } 
 
 
  public DateTime(Date value, TimeZone zone) {
    this.value = value.getTime();
    this.tzShift = zone.getOffset(value.getTime()) / 60000;
  } 
 
 
  public static DateTime now() { 
    return new DateTime(new Date(), GMT);
  } 
 
 
  /** 
   * Date/time value expressed as the number of ms since the Unix epoch. 
   * 
   * If the time zone is specified, this value is normalized to UTC, so 
   * to format this date/time value, the time zone shift has to be applied. 
   */