本文整理汇总了Java中org.onvif.ver10.schema.TimeZone类的典型用法代码示例。如果您正苦于以下问题:Java TimeZone类的具体用法?Java TimeZone怎么用?Java TimeZone使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TimeZone类属于org.onvif.ver10.schema包,在下文中一共展示了TimeZone类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setSystemDateAndTime
import org.onvif.ver10.schema.TimeZone; //导入依赖的package包/类
public void setSystemDateAndTime(Calendar calendar) throws Exception{
SetSystemDateAndTime request=new SetSystemDateAndTime();
request.setDateTimeType(SetDateTimeType.MANUAL);
request.setDaylightSavings(calendar.getTimeZone().useDaylightTime());
TimeZone tz= new TimeZone();
tz.setTZ(calendar.getTimeZone().getID());
request.setTimeZone(tz);
DateTime dt=new DateTime();
Date d=new Date();
d.setDay(calendar.get(Calendar.DAY_OF_MONTH));
d.setMonth(calendar.get(Calendar.MONTH));
d.setYear(calendar.get(Calendar.YEAR));
dt.setDate(d);
Time t=new Time();
t.setHour(calendar.get(Calendar.HOUR));
t.setMinute(calendar.get(Calendar.MINUTE));
t.setSecond(calendar.get(Calendar.SECOND));
dt.setTime(t);
request.setUTCDateTime(dt);
client.processRequest(request, SetSystemDateAndTimeResponse.class, serviceUrl, true);
}
示例2: getTimeZone
import org.onvif.ver10.schema.TimeZone; //导入依赖的package包/类
/**
* Ruft den Wert der timeZone-Eigenschaft ab.
*
* @return possible object is {@link TimeZone }
*
*/
public TimeZone getTimeZone() {
return timeZone;
}
示例3: setTimeZone
import org.onvif.ver10.schema.TimeZone; //导入依赖的package包/类
/**
* Legt den Wert der timeZone-Eigenschaft fest.
*
* @param value
* allowed object is {@link TimeZone }
*
*/
public void setTimeZone(TimeZone value) {
this.timeZone = value;
}
示例4: getTimeZone
import org.onvif.ver10.schema.TimeZone; //导入依赖的package包/类
/**
* Recupera il valore della proprietà timeZone.
*
* @return
* possible object is
* {@link TimeZone }
*
*/
public TimeZone getTimeZone() {
return timeZone;
}
示例5: setTimeZone
import org.onvif.ver10.schema.TimeZone; //导入依赖的package包/类
/**
* Imposta il valore della proprietà timeZone.
*
* @param value
* allowed object is
* {@link TimeZone }
*
*/
public void setTimeZone(TimeZone value) {
this.timeZone = value;
}