title: Bash: Both date "%b" and date "%h" (and of course) date "%B" gives full name of month?
body: <p>I am writing a shell-script in Ubuntu server 12.04 which is supposed to compare some data in a log file.
  In the log file, the date is given in the format:</p>
  
  <pre><code>[Mon Apr 08 15:02:54 2013]
  </code></pre>
  
  <p>As you can see, it states <strong>Apr</strong>.</p>
  
  <p>According to the <a href="http://ss64.com/bash/date.html" rel="nofollow">man-page</a>, the option to be used in bash for this is <strong>b</strong> or <strong>h</strong>.</p>
  
  <p>However it doesn't matter wether I (in my comparing script, or directly in shell) use <strong>b</strong>, <strong>h</strong> or <strong>B</strong>. They all return the full name of the month.</p>
  
  <pre><code>date +"%b" #Returns april (should have returned Apr)
  date +"%h" #Returns april (should have returned Apr)
  date +"%B" #Returns april (correct? Should it not be capital A?)
  </code></pre>
  
  <p>This of course makes it very difficult to do comparisons based on the date...</p>
  
  <p>Has anyone else experienced this, and found a solution?</p>
  
  <p>(I'm not sure if this is relevant, but I chose Norwegian as installation language when I installed the server.)</p>
  
  <p>Thank's to the answer of @toro2k here, I ended up with a working solution:</p>
  
  <pre><code>DATE=`LC_ALL=C date +%b" "%d" "%H`
  </code></pre>
  
  <p>(This did not work:</p>
  
  <pre><code>LC_ALL=C  
  </code></pre>
  
  <p>DATE=<code>date +%b" "%d" "%H</code></p>
  
  <p>)</p>