语言

Menu
Sites
Language
Setting timezone

Hi guys,

I'm trying to set the timezone in my web-app. I've ran throught the tutorial here:

https://developer.tizen.org/documentation/articles/time-api-guide

But when I run the command tizen.time.setCurrentDateTime() the function returns not defined. Looking at the API document that comes with the SDK that function does not exist under TimeUtils. So maybe the guide is for a different tizen base verison..

My first question is, is there another way to set timezone in the webapp? And my second question is, how can I tell what version of tizen these guides meant for?

Thanks.

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

1 回复
Raghavendra Reddy Shiva
The document refers to the old API version and needs to be updated. The lastest API doesn't provide the "setCurrentDateTime()" method. But yes, you can set the timezone in the web apps using the "TZDate" interface methods(setDate,setMonth,setFullYear, etc...). The below method can be used to get the TZDate object for a given timezone. TZDate toTimezone(DOMString tzid); For this, you might need to first query the supported Timezones using the "TimeUtil" interface "DOMString[] getAvailableTimezones()" which returns the array of the available time zone identifiers.