# Store date on production server

**URL:** <https://discourse.cakephp.org/t/store-date-on-production-server/7869>\
**Category:** Need Help\
**Created:** [May 27, 2020, 11:58am UTC](https://discourse.cakephp.org/t/store-date-on-production-server/7869 "2020-05-27T11:58:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shadowx.jb](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@shadowx.jb](https://discourse.cakephp.org/u/shadowx.jb)\
**Post date:** [May 27, 2020, 11:58am UTC](https://discourse.cakephp.org/t/store-date-on-production-server/7869/1 "2020-05-27T11:58:13Z")

</div>

I have a problem with date column, I save the data on the local server, but the date column is not saved on the production server, when the patch entity the column is not even written (not visible), no error … please help. I have everything same 1:1.

Local server:

```
		'date' => object(Cake\I18n\FrozenDate) {
			'time' => '2020-05-28 00:00:00.000000+02:00',
			'timezone' => 'Europe/Prague',
			'fixedNowTime' => false
		},

```

Production server:

```
		'date' => null,
```

---

<div class="post-metadata">

**Author:** ![shadowx.jb](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@shadowx.jb](https://discourse.cakephp.org/u/shadowx.jb)\
**Post date:** [May 27, 2020, 1:14pm UTC](https://discourse.cakephp.org/t/store-date-on-production-server/7869/2 "2020-05-27T13:14:51Z")

</div>

Problem solved, I cleared all caches and it works. Does anyone know why this affects the cache?

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [May 27, 2020, 2:03pm UTC](https://discourse.cakephp.org/t/store-date-on-production-server/7869/3 "2020-05-27T14:03:27Z")

</div>

It’s time consuming to built the list of columns and their types for tables, so the system does it once and caches it. When patching, it uses that cached information to determine what columns are there; trying to save into a column that doesn’t exist will cause SQL errors, after all, so it wants to avoid that. Every time you change anything about your schema, you need to clear the cache, so that it will be rebuilt with new details.
