本文整理汇总了Java中org.onvif.ver10.schema.SetDateTimeType类的典型用法代码示例。如果您正苦于以下问题:Java SetDateTimeType类的具体用法?Java SetDateTimeType怎么用?Java SetDateTimeType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SetDateTimeType类属于org.onvif.ver10.schema包,在下文中一共展示了SetDateTimeType类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setSystemDateAndTime
import org.onvif.ver10.schema.SetDateTimeType; //导入依赖的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: resetSystemDateAndTime
import org.onvif.ver10.schema.SetDateTimeType; //导入依赖的package包/类
private void resetSystemDateAndTime() {
Calendar calendar = Calendar.getInstance();
Date currentDate = new Date();
boolean daylightSavings = calendar.getTimeZone().inDaylightTime(currentDate);
org.onvif.ver10.schema.TimeZone timeZone = new org.onvif.ver10.schema.TimeZone();
timeZone.setTZ(displayTimeZone(calendar.getTimeZone()));
org.onvif.ver10.schema.Time time = new org.onvif.ver10.schema.Time();
time.setHour(calendar.get(Calendar.HOUR_OF_DAY));
time.setMinute(calendar.get(Calendar.MINUTE));
time.setSecond(calendar.get(Calendar.SECOND));
org.onvif.ver10.schema.Date date = new org.onvif.ver10.schema.Date();
date.setYear(calendar.get(Calendar.YEAR));
date.setMonth(calendar.get(Calendar.MONTH) + 1);
date.setDay(calendar.get(Calendar.DAY_OF_MONTH));
org.onvif.ver10.schema.DateTime utcDateTime = new org.onvif.ver10.schema.DateTime();
utcDateTime.setDate(date);
utcDateTime.setTime(time);
device.setSystemDateAndTime(SetDateTimeType.MANUAL, daylightSavings, timeZone, utcDateTime);
}
示例3: getDateTimeType
import org.onvif.ver10.schema.SetDateTimeType; //导入依赖的package包/类
/**
* Ruft den Wert der dateTimeType-Eigenschaft ab.
*
* @return possible object is {@link SetDateTimeType }
*
*/
public SetDateTimeType getDateTimeType() {
return dateTimeType;
}
示例4: setDateTimeType
import org.onvif.ver10.schema.SetDateTimeType; //导入依赖的package包/类
/**
* Legt den Wert der dateTimeType-Eigenschaft fest.
*
* @param value
* allowed object is {@link SetDateTimeType }
*
*/
public void setDateTimeType(SetDateTimeType value) {
this.dateTimeType = value;
}
示例5: getDateTimeType
import org.onvif.ver10.schema.SetDateTimeType; //导入依赖的package包/类
/**
* Recupera il valore della proprietà dateTimeType.
*
* @return
* possible object is
* {@link SetDateTimeType }
*
*/
public SetDateTimeType getDateTimeType() {
return dateTimeType;
}
示例6: setDateTimeType
import org.onvif.ver10.schema.SetDateTimeType; //导入依赖的package包/类
/**
* Imposta il valore della proprietà dateTimeType.
*
* @param value
* allowed object is
* {@link SetDateTimeType }
*
*/
public void setDateTimeType(SetDateTimeType value) {
this.dateTimeType = value;
}