# shiftcontroller/4.9.24/sh4/conf/html/admin/controller/datetime.php

ShiftController Employee Shift Scheduling, version 4.9.24. 40 lines.

- Page: https://pluginprobe.com/plugins/shiftcontroller/4.9.24/code/sh4/conf/html/admin/controller/datetime.php
- Raw: https://pluginprobe.com/plugins/shiftcontroller/4.9.24/raw/sh4/conf/html/admin/controller/datetime.php
- Modified: 2023-02-22T09:21: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.24/code/sh4/conf/html/admin/controller/datetime.php#L10-L20`.

```php
<?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
class SH4_Conf_Html_Admin_Controller_Datetime
{
	public function __construct(
		HC3_Hooks $hooks,
		HC3_Post $post,
		HC3_Settings $settings
		)
	{
		$this->post = $hooks->wrap($post);
		$this->settings = $hooks->wrap($settings);
	}

	public function execute()
	{
		$take = array(
			'datetime_date_format', 'datetime_time_format', 'datetime_week_starts', 'full_day_count_as',
			'datetime_min_time', 'datetime_max_time', 'datetime_step', 'datetime_timezone',
			'datetime_hide_schedule_reports', 'datetime_hide_bottom_date_navigation',
			'default_schedule_view', 'default_schedule_groupby', 'datetime_n_weeks'
			);

		foreach( $take as $k ){
			$v = $this->post->get($k);
			$this->settings->set( $k, $v );
		}

		$k = 'skip_weekdays';
		$v = $this->post->get($k);
		if( $v ){
			$this->settings->set( $k, $v );
		}
		else {
			$this->settings->reset( $k );
		}

		$return = array( 'admin/conf/datetime', '__Settings Updated__' );
		return $return;
	}
}
```
