当前位置: 首页>>代码示例>>Java>>正文


Java SetDateTimeType类代码示例

本文整理汇总了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);
}
 
开发者ID:D2Edev,项目名称:onvifjava,代码行数:22,代码来源:DeviceManagementService.java

示例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);
}
 
开发者ID:fpompermaier,项目名称:onvif,代码行数:20,代码来源:OnvifDevice.java

示例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;
}
 
开发者ID:D2Edev,项目名称:onvifjava,代码行数:10,代码来源:SetSystemDateAndTime.java

示例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;
}
 
开发者ID:D2Edev,项目名称:onvifjava,代码行数:11,代码来源:SetSystemDateAndTime.java

示例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;
}
 
开发者ID:fpompermaier,项目名称:onvif,代码行数:12,代码来源:SetSystemDateAndTime.java

示例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;
}
 
开发者ID:fpompermaier,项目名称:onvif,代码行数:12,代码来源:SetSystemDateAndTime.java


注:本文中的org.onvif.ver10.schema.SetDateTimeType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。