CREATE TABLE `doc_calendars` (
  `date` date NOT NULL,
  `available` tinyint(1) NOT NULL,
  PRIMARY KEY (`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `doc_calendars`(`date`, `available`) VALUES ('2018-01-12', 0);

select * from doc_calendars;
select * from doc_calendars where `date` = '2018-01-12';
select * from doc_calendars where `date` = '2018-01-12T00:00:00';
select * from doc_calendars where `date` = '2018-01-12T00:00:00+01:00.000000';

update doc_calendars set available = 1 where `date` = '2018-01-12T00:00:00';
select * from doc_calendars;

update doc_calendars set available = 0 where `date` = '2018-01-12T00:00:00+01:00.000000';
select * from doc_calendars;

DROP TABLE `doc_calendars`;

CREATE TABLE `doc_calendars` (
  `date` date NOT NULL,
  `available` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `doc_calendars`(`date`, `available`) VALUES ('2018-01-12', 0);

select * from doc_calendars;
select * from doc_calendars where `date` = '2018-01-12';
select * from doc_calendars where `date` = '2018-01-12T00:00:00';
select * from doc_calendars where `date` = '2018-01-12T00:00:00+01:00.000000';

update doc_calendars set available = 1 where `date` = '2018-01-12T00:00:00';
select * from doc_calendars;

update doc_calendars set available = 0 where `date` = '2018-01-12T00:00:00+01:00.000000';
select * from doc_calendars;

DROP TABLE `doc_calendars`;
