# shiftcontroller/4.9.95/sh4/schedule/html/controller/exacttime.php

ShiftController Employee Shift Scheduling, version 4.9.95. 55 lines.

- Page: https://pluginprobe.com/plugins/shiftcontroller/4.9.95/code/sh4/schedule/html/controller/exacttime.php
- Raw: https://pluginprobe.com/plugins/shiftcontroller/4.9.95/raw/sh4/schedule/html/controller/exacttime.php
- Modified: 2023-05-29T12:46:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/shiftcontroller/4.9.95/code/sh4/schedule/html/controller/exacttime.php#L10-L20`.

```php
<?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
class SH4_Schedule_Html_Controller_ExactTime
{
	public $t, $post;

	public function __construct(
		HC3_Time $t,
		HC3_Hooks $hooks,
		HC3_Post $post
		)
	{
		$this->t = $t;
		$this->post = $hooks->wrap($post);
	}

	public function execute()
	{
		$p = array();

		$date = $this->post->get('date');
		$time = $this->post->get('time');

		$dateTimeDb = $this->t->setDateDb( $date )
			->modify( '+' . $time . ' seconds' )
			->formatDateTimeDb()
		;

		$p['start'] = null;
		$p['end'] = null;
		$p['time'] = $dateTimeDb;

		$ret = array( array('-referrer-', $p), null );
		return $ret;
	}

	public function executeMy()
	{
		$p = array();

		$date = $this->post->get('date');
		$time = $this->post->get('time');

		$dateTimeDb = $this->t->setDateDb( $date )
			->modify( '+' . $time . ' seconds' )
			->formatDateTimeDb()
		;

		$p['start'] = null;
		$p['end'] = null;
		$p['time'] = $dateTimeDb;

		$ret = array( array('-referrer-', $p), null );
		return $ret;
	}
}
```
