Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
do5734
Posts: 4
Registered: ‎04-05-2011
My Device: BB 9700
My Carrier: Vodafone

Blackberry 6: getTimezoneOffset

 

Hi,

 

in my blackberry 6 widget I try to use following JavaScript-Code to calculate timezone of the client.


var tiz = -(new Date().getTimezoneOffset() / 60);

 

Here you can find online example.
Unfortunately BB6 calculates only 0.
May be someone has an idea what's the matter here or maybe suggests code that works better on BB6.
Thanks in advance!
Daniel

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Blackberry 6: getTimezoneOffset

There is a thread below that describes a known issue on some models of BlackBerry devices running OS 6.0 around timezone offsets.

 

http://supportforums.blackberry.com/t5/Web-Development/Javscript-GMT-Offfset-not-working-in-BB6-0-De...

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.