title: Laravel / Moment - How to determine if created_at during Daylight Savings?
body: <p>How do I determine if an entry in my database (<code>laravel</code>) was stored during Daylight Savings time using the <code>created_at</code> field?</p>
  
  <p>I'm trying to calculate the time <strong>difference between when a record was saved and now</strong> so I can do can show something like <code>3 hours ago</code> or <code>49 minutes ago</code>. This was working fine, until the UK entered Daylight Savings Time a couple of weeks ago and now all times are inflated by 1 Hour.</p>
  
  <p>I'm using moment to show the result like the following;</p>
  
  <pre><code>getElapsedString(from) {
     return moment(from).fromNow();
  }
  </code></pre>
  
  <p>The data is stored in my database in the following format and this is what is passed in to the above function as <code>from</code>;</p>
  
  <p><code>2019-04-10 09:27:48</code></p>
  
  <p>I'm not doing anything to the dates when they are stored. This is handled by Laravel.</p>