Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting local time in Midlet  RSS feed

 
Danish Shaukat
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
In my midlet I use currentTmeMillis() method of System class to get a long value. This long value is used to create a Date object.I get the time as GMT. But I want to convert this to local time and display it to the user. The Date class has been ripped in CLDC so i cannot convert this to local time. Any idea how i can achieve this ?
Danish
 
Jonathan Knudsen
Author
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a stumper. You could search around and see if anyone's come up with time utilities for MIDP. Other than that you'll probably have to write it yourself.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!