Still problems displaying the date and time in J2ME

Posted on 2007-08-01
Last Modified: 2013-11-24
I have tried to display the correct date time using the following code:
               Date today = new Date(System.currentTimeMillis());

               DateField datefield = new DateField("", DateField.DATE_TIME);

The date is correct but for the time it give me 3 hours more than actual one.

I am using the Sun Java Wirelles Toolkit to do this. J2ME
Question by:jonathan_otero
    LVL 4

    Accepted Solution

    Please check the locale of your machine, you might not have selected your country as your locale reference.
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Java MSI Solution 3 51
    triangle challenge 4 38
    wordcount challenge 11 47
    Unexpected HttpURLConnection connection behavior 2 19
    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
    This video teaches viewers about errors in exception handling.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now