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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Contributor
zitvh
Posts: 14
Registered: ‎02-09-2011

date offset problem.

Hi,

 

I have a problem with the offset function of the date object. For some reason when I set the Blackberry timezone above GMT+0000 ( say GMT+0400), and run date.getTimezoneOffset() I only get 0.

 

My offset function:

 

function formatOffset(date) {
    var offset = -date.getTimezoneOffset() / 60;
    return offset;
}

 

 

Please use plain text.