You Are Here:

Community: Developer Discussion Boards

#1 Old Smile Time of Device - 2009-11-07, 12:23

Join Date: Dec 2008
Posts: 165
Location: Mumbai
Send a message via Skype™ to prajapati.ajay
prajapati.ajay's Avatar
prajapati.ajay
Offline
Regular Contributor
hi frnd

can u help me when i use System.currentTimeMillis() to retirive current time of device it is showing Thu Jan 01 10:49:20 GMT+05:00 1970

can u help me to solve this problem .i want current time of device..

thanks in advance


Ajay Kumar
J2ME Mobile Software Developer
Aamchi Mumbai,India
Reply With Quote

#2 Old Re: Time of Device - 2009-11-09, 07:03

Join Date: Apr 2009
Posts: 391
ingsaurabh's Avatar
ingsaurabh
Offline
Regular Contributor
try following code

PHP Code:
date = new Date(System.currentTimeMillis());
        
String da date.toString();
        
da da.substring(11,19);
System.out.println("this time----------"da); 


Regards,
Saurabh
Reply With Quote

#3 Old Smile Re: Time of Device - 2009-11-11, 09:51

Join Date: Dec 2008
Posts: 165
Location: Mumbai
Send a message via Skype™ to prajapati.ajay
prajapati.ajay's Avatar
prajapati.ajay
Offline
Regular Contributor
hi frnd

thanks for reply.but hav you notice that in current time it is showing GMT+05:00 but this not right for mumbai(India).it should be GMT+05:30
i am getting right time but approx 30 minute late ...

plz help same code is working in sony w810i but not working Nokia 6680,E61

thanks in advance..


Ajay Kumar
J2ME Mobile Software Developer
Aamchi Mumbai,India
Reply With Quote

#4 Old Re: Time of Device - 2009-11-11, 09:53

Join Date: Apr 2009
Posts: 391
ingsaurabh's Avatar
ingsaurabh
Offline
Regular Contributor
I donno abt mumbai but in my case its giving me correct time as device default clock is showing


Regards,
Saurabh
Reply With Quote

#5 Old Smile Re: Time of Device - 2009-11-11, 11:05

Join Date: Dec 2008
Posts: 165
Location: Mumbai
Send a message via Skype™ to prajapati.ajay
prajapati.ajay's Avatar
prajapati.ajay
Offline
Regular Contributor
hi frnd

thanks for your reply

i found some hint.i retrieved Default GMT of My Nokia E61 phone it shown me GMT+05:00

by this code

TimeZone tz=TimeZone.getDefault();

System.out.println("Time Zone"+tz.getID());


and i checked on my sony W810i phone it shows default Time Zone is GMT+05:30.this time zone is for india..
above is not for india.i think this is reason application showing time approx 30 minute late..


can u help me to handle this type of problem


thanks


Ajay Kumar
J2ME Mobile Software Developer
Aamchi Mumbai,India
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to initiate debugging on an N82 device fxtoltec Carbide.c++ IDE and plug-ins 8 2009-07-27 14:04
SMS network time & device time linxin79 Symbian Networking & Messaging 2 2009-05-25 11:16
RegisterAlarm() - Device busy at scheduled time sunil_talent Mobile Java General 3 2007-08-23 19:04
device discovery time? shivaprashanth Bluetooth Technology 3 2007-08-22 14:06
Device discovery timeout on Symbian laa-laa Bluetooth Technology 1 2003-09-24 11:50

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia