<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Chronos on php-tips.com</title>
    <link>https://php-tips.com/tags/chronos/</link>
    <description>Recent content in Chronos on php-tips.com</description>
    <generator>Hugo</generator>
    <language>ja</language>
    <lastBuildDate>Fri, 10 Aug 2018 19:58:38 +0900</lastBuildDate>
    <atom:link href="https://php-tips.com/tags/chronos/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Chronosを1.2へバージョンアップしよう</title>
      <link>https://php-tips.com/2018/08/10/update-to-chronos-1-2/</link>
      <pubDate>Fri, 10 Aug 2018 19:58:38 +0900</pubDate>
      <guid>https://php-tips.com/2018/08/10/update-to-chronos-1-2/</guid>
      <description>&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;composer require cakephp/chronos:^1.2
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;setTestNow()&lt;/code&gt;メソッドがクラスを横断して時刻セットできるようなった！&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;CakePHP 3.2以降、時刻操作クラスとして &lt;a href=&#34;https://github.com/cakephp/chronos&#34;&gt;cakephp/chronos&lt;/a&gt; が採用されています。
CakePHP内ではChronosを継承した &lt;code&gt;\Cake\I18n\FrozenTime&lt;/code&gt;, &lt;code&gt;\Cake\I18n\Time&lt;/code&gt;, &lt;code&gt;\Cake\I18n\FrozenDate&lt;/code&gt;, &lt;code&gt;\Cake\I18n\Date&lt;/code&gt; を使用でき、データベースの時刻系のフィールドはこれらのクラスへマッピングされます。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
