<commit_before><?php

	Class DateTimeObj{

		public static function setDefaultTimezone($timezone){
			if(!@date_default_timezone_set($timezone)) trigger_error(E_USER_WARNING, "Invalid timezone '{$timezone}'");
		}
		
		public static function getGMT($format, $timestamp=NULL){
			return self::get($format, $timestamp, 'GMT');
		}
		
		public static function getTimeAgo($format){
			return '<abbr class="timeago" title="'.self::get('r').'">'.self::get($format).'</abbr>';
		}
		
		public static function get($format, $timestamp=NULL, $timezone=NULL){
			if(!$timestamp || $timestamp == 'now') $timestamp = time();
			if(!$timezone) $timezone = date_default_timezone_get();
			
			$current_timezone = date_default_timezone_get();
			if($current_timezone != $timezone) self::setDefaultTimezone($timezone);

			$ret = date($format, $timestamp);
			
			if($current_timezone != $timezone) self::setDefaultTimezone($current_timezone);
			
			return $ret;
			
		}
	
	}
<commit_msg>Swap the arguments being passed to trigger_error().<commit_after><?php

	Class DateTimeObj{

		public static function setDefaultTimezone($timezone){
			if(!@date_default_timezone_set($timezone)) trigger_error("Invalid timezone '{$timezone}'", E_USER_WARNING);
		}
		
		public static function getGMT($format, $timestamp=NULL){
			return self::get($format, $timestamp, 'GMT');
		}
		
		public static function getTimeAgo($format){
			return '<abbr class="timeago" title="'.self::get('r').'">'.self::get($format).'</abbr>';
		}
		
		public static function get($format, $timestamp=NULL, $timezone=NULL){
			if(!$timestamp || $timestamp == 'now') $timestamp = time();
			if(!$timezone) $timezone = date_default_timezone_get();
			
			$current_timezone = date_default_timezone_get();
			if($current_timezone != $timezone) self::setDefaultTimezone($timezone);

			$ret = date($format, $timestamp);
			
			if($current_timezone != $timezone) self::setDefaultTimezone($current_timezone);
			
			return $ret;
			
		}
	
	}

{'fraction_non_alphanumeric': 0.16498486377396568, 'fraction_numerical': 0.0, 'mean_word_length': 5.355769230769231, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2352300', 'n_tokens_mistral': 728, 'n_tokens_neox': 619, 'n_words': 118}