Completed
Pull Request — master (#664)
by
unknown
10:16 queued 05:06
created
code/SS_Datetimezone.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
  */
7 7
 class SS_Datetimezone extends SS_Datetime {
8 8
 	/**
9
-	* 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”
10
-	*/
9
+	 * 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”
10
+	 */
11 11
 	public function Nice() {
12 12
 		//instantiate new DateTime object based off received timestamp in the default timezone
13 13
 		$timestamp = new DateTime($this->value, new DateTimeZone(date_default_timezone_get()));
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 		$timestamp = new DateTime($this->value, new DateTimeZone(date_default_timezone_get()));
14 14
 		//if a user is logged in, has set a timezone that is in the allowed list and 
15 15
 		//that timezone is NOT the default one then convert the timestamp to use the selected timezone
16
-		if(Member::currentUserID() && isset(Member::CurrentUser()->Timezone) && in_array(Member::CurrentUser()->Timezone, timezone_identifiers_list()) && Member::CurrentUser()->Timezone != date_default_timezone_get()){
16
+		if (Member::currentUserID() && isset(Member::CurrentUser()->Timezone) && in_array(Member::CurrentUser()->Timezone, timezone_identifiers_list()) && Member::CurrentUser()->Timezone != date_default_timezone_get()) {
17 17
 			$timestamp->setTimezone(new DateTimeZone(Member::CurrentUser()->Timezone));    
18 18
 		}
19 19
 		//return timestamp in "Nice" format + the user's timezone
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 		$timestamp = new DateTime($this->value, new DateTimeZone(date_default_timezone_get()));
14 14
 		//if a user is logged in, has set a timezone that is in the allowed list and 
15 15
 		//that timezone is NOT the default one then convert the timestamp to use the selected timezone
16
-		if(Member::currentUserID() && isset(Member::CurrentUser()->Timezone) && in_array(Member::CurrentUser()->Timezone, timezone_identifiers_list()) && Member::CurrentUser()->Timezone != date_default_timezone_get()){
16
+		if(Member::currentUserID() && isset(Member::CurrentUser()->Timezone) && in_array(Member::CurrentUser()->Timezone, timezone_identifiers_list()) && Member::CurrentUser()->Timezone != date_default_timezone_get()) {
17 17
 			$timestamp->setTimezone(new DateTimeZone(Member::CurrentUser()->Timezone));    
18 18
 		}
19 19
 		//return timestamp in "Nice" format + the user's timezone
Please login to merge, or discard this patch.
code/extensions/TimezoneMemberExtension.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 		return array_combine($timezones, $timezones);
15 15
 	}
16 16
 
17
-	public function updateCMSFields(FieldList $fields) {   
17
+	public function updateCMSFields(FieldList $fields) {
18 18
 		$fields->removeFieldFromTab('Root', 'Timezone');
19 19
 		$field = DropdownField::create(
20 20
 		  'Timezone',
Please login to merge, or discard this patch.