@@ 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 |
|
@@ 119-125 (lines=7) @@ | ||
116 | * |
|
117 | * @return string |
|
118 | */ |
|
119 | public function getOpenTimeHumanAttribute() |
|
120 | { |
|
121 | $time = new Carbon($this->attributes[ 'open_time' ], 'UTC'); |
|
122 | $time = $time->setTimezone(Auth::user()->timezone); |
|
123 | ||
124 | return $time->format('h:i a'); |
|
125 | } |
|
126 | ||
127 | /** |
|
128 | * Accessor: Get the close time of the device converted to hours and minutes |