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
Highlighted
Contributor
Posts: 14
Registered: ‎02-09-2011
My Device: Not Specified

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;
}