facebook

time stamp issue

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #229029 Reply

    System.out.println(Calendar.getInstance().getTime());

    always return: Tue May 03 12:10:23 GMT-06:00 2005

    I want this to return: Tue May 03 12:10:23 CDT 2005

    I am running windows XP as OS. Any know what I need to do to change this.

    thanks

    #229034 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev, has nothing to do with ME.

    #229251 Reply

    Pat Osterday
    Member

    use SimpleDateFormat – check out the javadocs at java.sun.com.

    Then you can create whatever you need, example:
    SimpleDateFormat gmtTime = new SimpleDateFormat(“MM/dd hh:mm:ss a (z)”);

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: time stamp issue

You must be logged in to post in the forum log in