function DateUtil(){

	this.getUTCNow = function(){
	
		var now = new Date();
		
		return now.getUTCFullYear() + "-" + this.sprintf(now.getUTCMonth()+1) + "-" + this.sprintf(now.getUTCDate()) +
		" " +
		this.sprintf(now.getUTCHours()) +
		":" +
		this.sprintf(now.getUTCMinutes()) +
		":" +
		this.sprintf(now.getUTCSeconds());
	}
	
	// Returns hours and minutes
	this.getTime = function(_utcTime, _showSeconds){
	
		var date = new Date();
		date.setUTCFullYear(_utcTime.substring(0, 4));
		date.setUTCMonth(_utcTime.substring(5, 7));
		date.setUTCDate(_utcTime.substring(8, 10));
		date.setUTCHours(_utcTime.substring(11, 13));
		date.setUTCMinutes(_utcTime.substring(14, 16));
		date.setUTCSeconds(_utcTime.substring(17, 20));
		
		var time = this.sprintf(date.getHours()) + ":" + this.sprintf(date.getMinutes());
		
		if (_showSeconds == true) 
			time += ":" + date.getSeconds();
		
		return time;
	}
	
	this.sprintf = function(_value) {
		
		if(_value < 10)
			return "0" + _value;
			
		return _value;
	}
}
