• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

DateFormat?

 
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The original Date is :Mon May 15 16:17:19 CST 2006
I want to format it like this: "hh:mm:ss dd-MMM-yyyy", So I add two lines.
Now the resuslt is: 01:17:19 15-五月-2006, that reflect the local I am. What I want is :01:17:19 15-May-2006, So I set the TimeZone.

Suprise! The result still is: 01:17:19 15-五月-2006
Why this happened? And how to get what I want?

Thank you in advance.
[ May 15, 2006: Message edited by: Loius Wan ]
 
Qunfeng Wang
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem resolved by Locale.US.
 
Qunfeng Wang
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem resolved by Locale.US.
I want to ask if my application just run in US, does it a need to set Locale? I develope it in China, but it only used in US.
 
The moth suit and wings road is much more exciting than taxes. Or this tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic