title: Europe/Moscow time zone issue with strptime
body: <p>I am working on a software that performs some time series manipulations. I have recently discovered a serious issue on R script side that I had developed; the unexpected behaviour was isolated on a specific machine which had <code>Europe/Moscow</code> locale. The issue boils down to the following snippet:</p>
  
  <pre><code>strange_days &lt;- c("2/1/1984", "3/1/1984", "4/1/1984", "5/1/1984", "6/1/1984") 
  Sys.setenv(TZ='Europe/Moscow')
  d &lt;- strptime(strange_days, '%m/%d/%Y')
  d
  [1] "1984-02-01 MSK" "1984-03-01 MSK" "1984-04-01"     "1984-05-01 MSD" "1984-06-01 MSD"
  </code></pre>
  
  <p>Everything <em>seems</em> to be correctly recognized. I thought that since this is daily data, time zone attribute is not making much difference; painful mistake:</p>
  
  <pre><code>as.numeric(d)
  [1] 444430800 446936400        NA 452203200 454881600
  </code></pre>
  
  <p>which obviously fails afterwards during conversion to an <code>xts</code> object. </p>
  
  <p>The current fix is to force all timezones to GMT via <code>strptime(strange_days, '%m/%d/%Y', tz='GMT')</code> or even <code>Sys.setenv(TZ='GMT')</code>; the issue is gone with that. </p>
  
  <p>Is it a good practice? Will the code be reliable in all situations? What techniques would you recommend to make avoid similar problems?</p>
  
  <p>And what's so particular took place on the 1st of April 1984?</p>
  
  <p><strong>Edit</strong>: <a href="https://stackoverflow.com/questions/2532729/daylight-saving-time-and-time-zone-best-practices">this</a> and <a href="https://stackoverflow.com/questions/17604322/r-strptime-and-is-na-unexpected-results">this</a> questions are indicating this is probably a daylight saving that causes the problem.</p>
  
  <pre><code>sessionInfo()
  R version 3.1.0 (2014-04-10)
  Platform: x86_64-w64-mingw32/x64 (64-bit)
  
  locale:
  [1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
  [4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  loaded via a namespace (and not attached):
  [1] tools_3.1.0
  </code></pre>
  
  <p><strong>Edit 2</strong>: issue is clearly Windows-specific, not reproduced on linux with these specs:</p>
  
  <pre><code>R version 3.1.0 (2014-04-10)
  Platform: i686-pc-linux-gnu (32-bit)
  
  locale:
   [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
   [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
   [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  loaded via a namespace (and not attached):
  [1] tools_3.1.0
  </code></pre>