The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 08-22-2007
jim mcnamara jim mcnamara is offline
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,365
First off, the format strings are the same regardless of NLS (locale) settings.
ie. %Y is a four digit number %A = day of week. This works unless you are using wide characters- ie, a charset like Greek or Arabic. Then you use alternates. These begin with %E or %O.

Next.
What locale for LC_TIME? And to answer that we need to know which UNIX you're using.
Plus, you do know LC_TIME can affect things like the first day of the week as well.

Do you know about setlocale()?

Finally.
Read the man page about strptime(). It is far easier to use than getdate(), because it does not require an external file.

If you give us exact specifications it would help a lot.
Reply With Quote