- From: 联通集团技术部 <sunx5@chinaunicom.cn>
- Date: Fri, 23 Aug 2013 15:50:42 +0800
- To: "'public-sysapps@w3.org'" <public-sysapps@w3.org>, "'ch.dumez@sta.samsung.com'" <ch.dumez@sta.samsung.com>
- Message-ID: <3B545D03776B7B48AAE24A15AE243CDE2F40EB8ADE@HQMBX01.hq.cnc.intra>
Hi, All We’d like to propose some ideas regarding to Timezone handling issue in Task Scheduler API. A typical use case of invoking Task Scheduling API -- Assuming a telephone conference will be hold at 10 o’clock a.m. in Beijing, the alarm would be awaked at night time if the attendee travels to United States. This is a timezone-aware situation. As mentioned in foregone discussion, the ECMAScript Date objects don't have time zone information. Therefore, it is hard to automatically compute the time zone offset by current API function. A good suggestion proposed by Mounir is to constract a ScheduleTask object instead of Alarm API[1]. The solution we have been thinking of is to use a combination of timezone interface (belongs to TaskSchedule API) and position interface (belongs to Geolocation API). The WebIDL would look like: enum TimezoneLongitudeMapping {“0”, “-1” , “-2” , “-3” , “-4” , “-5” , “-6” , “-7” , “-8” , “-9” , “-10” , “-11” , “-12” , “+1” , “+2” , “+3” , “+4” , “+5” , “+6” , “+7” , “+8” , “+9” , “+10” , “+11” , “+12” } interface TimezoneOffset { attribute Offset offset; void getTimezoneOffset (Position position, TimezoneLongitudeMapping timezoneLongitudeMapping); }; interface Position { readonly attribute Coordinates coords; readonly attribute DOMTimeStamp timestamp; }; Note that the Position interface could be consistent with the definition in Geolocation API. Our new interface TimezoneOffset aims to mapping the longitude value into the timezone information according to UTC. Since the timezone switching is a very rare event, the operation of calculating timezone offset could be invoked within a long interval. If timezone switching has been detected, the user agent or applications should automatically adjust the predefined time value according to timezone information if the application scenario is timezone-respect. [1]http://lists.w3.org/Archives/Public/public-sysapps/2013May/0104.html Best Regards, ———————————————— Xin Sun China United Network Communications Group Company Limited Email: sunx5@chinaunicom.cn
Received on Sunday, 25 August 2013 18:01:06 UTC