| @@ 120-126 (lines=7) @@ | ||
| 117 | * |
|
| 118 | * @return string |
|
| 119 | */ |
|
| 120 | public function getOpenTimeHumanAttribute() |
|
| 121 | { |
|
| 122 | $time = new Carbon($this->attributes['open_time'], 'UTC'); |
|
| 123 | $time = $time->setTimezone(Auth::user()->timezone); |
|
| 124 | ||
| 125 | return $time->format('h:i a'); |
|
| 126 | } |
|
| 127 | ||
| 128 | /** |
|
| 129 | * Accessor: Get the close time of the device converted to hours and minutes |
|
| @@ 153-159 (lines=7) @@ | ||
| 150 | * |
|
| 151 | * @return string |
|
| 152 | */ |
|
| 153 | public function getCloseTimeHumanAttribute() |
|
| 154 | { |
|
| 155 | $time = new Carbon($this->attributes['close_time'], 'UTC'); |
|
| 156 | $time = $time->setTimezone(Auth::user()->timezone); |
|
| 157 | ||
| 158 | return $time->format('h:i a'); |
|
| 159 | } |
|
| 160 | ||
| 161 | /** |
|
| 162 | * Set the open time to UTC |
|