@@ -10,12 +10,12 @@ |
||
10 | 10 | * Returns the date in the raw SQL-format specific to a given timezone passed from the Member class, e.g. “2006-01-18 16:32:04” |
11 | 11 | */ |
12 | 12 | public function Nice() { |
13 | - if($timestamp = $this){ |
|
13 | + if ($timestamp = $this) { |
|
14 | 14 | //instantiate new DateTime object based off received timestamp in the default timezone |
15 | 15 | $timestamp = new DateTime($timestamp, new DateTimeZone(date_default_timezone_get())); |
16 | 16 | //if a user is logged in, has set a timezone that is in the allowed list and |
17 | 17 | //that timezone is NOT the default one then convert the timestamp to use the selected timezone |
18 | - if(Member::currentUserID() && isset(Member::CurrentUser()->Timezone) && in_array(Member::CurrentUser()->Timezone, timezone_identifiers_list()) && Member::CurrentUser()->Timezone != date_default_timezone_get()){ |
|
18 | + if (Member::currentUserID() && isset(Member::CurrentUser()->Timezone) && in_array(Member::CurrentUser()->Timezone, timezone_identifiers_list()) && Member::CurrentUser()->Timezone != date_default_timezone_get()) { |
|
19 | 19 | $timestamp->setTimezone(new DateTimeZone(Member::CurrentUser()->Timezone)); |
20 | 20 | } |
21 | 21 | } |