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

Java Development

Reply
Developer
Posts: 81
Registered: ‎07-16-2008
My Device: Curve - 8320
My Carrier: AirTel

Help needed with BlackBerry network time


Quote From Previous Forum:

 

 

richiebaby

Posts: 1
From: UK
Registered: Feb, 2007

Help needed with BlackBerry network time
Posted: Feb 21, 2007 5:06 AM Reply 

 

Hi,

I've knocked up a little Java app that takes the timestamp from the BlackBerry device. This causes a problem because the user can change device time settings so incorrect data/time info gets captured.

To solve this I tried using:

//fetching network time
long networkTime = netInfo.getNetworkTime(System.currentTimeMillis() );

This seems to work on a BlackBerry simulator, i.e. if I change the simulator time, the correct time is still captured. My question is: How does this work and where is the 'network time' actually being captured from when using a real device?

Also, if there are other ways of doing this I would be happy to hear about them

Thanks



adwiv

Posts: 186
Registered: Nov, 2006

Re: Help needed with BlackBerry network time
Posted: Feb 21, 2007 9:30 AM Reply

 

The network time is provided by the cellular network in case of a real device and your desktop computer in case of a simulator.

Not all kinds of networks provide network time, and if provided, it will be unavailable when the radio is off.

Its better to use the time provided by the device in almost all cases. If people are changing the time, they must have a reason.

  

 

 

VipulPathak

Posts: 59
From: Columbia, MD
Registered: Apr, 2008

Re: Help needed with BlackBerry network time
Posted: Jul 28, 2008 12:42 PM Reply 

 

Agree that Network may not be available while Radio OFF, but it is still interesting (and my need) to find if the Device's Date/Time source is set to Blackberry Network or is OFF.

Any way for that?

Thanks in Advance,


 

 

Any one knows, if the Device's Date/Time source is set to Blackberry Network or is OFF.

*(Vipul)() ;
BlackBerry Development Advisor
Posts: 15,753
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Help needed with BlackBerry network time

There is not API that exposes whether the BlackBerry handheld's time setting is set to Network or BlackBerry.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 27
Registered: ‎09-04-2008
My Device: Not Specified

Re: Help needed with BlackBerry network time

Hi,

 

Just taking a look at the API doc for getNetworkTime().  For a network that does not contain network time, what value would be returned?

 

The application we are writing involves BlackBerries across many networks.  We would need to test getNetworkTime to ensure its is quality before using it.

 

Thanks,

Matt

New Member
Posts: 1
Registered: ‎05-03-2010
My Device: 8530 Curve
My Carrier: Verizon

Re: Help needed with BlackBerry network time

there is a tricky solution, the thing is when you change ur timezone, I think Blackberry thinks that you dont want autotime zone feature on (even tough it says its on). so what I did was I set the timezone to my home time zone which was EST and turn the auto update time zone off and save and turn the auto update time zone on and save, and it worked, it changed the time zone to CST that where I was.