function Realmtime_PROTO(obj,tick,year,cycle,month,day,hour,season,cached) {
	this.obj = document.getElementById(obj);
	this.basetick = tick;
	this.tick = tick;

	/* Basic constants */
	/* 1 IG hour = 3 IRL minutes = 1800 ticks */
	this.RYTIME_HOUR_TICKS = 1800;
	this.RYTIME_DAY_HOURS = 24;
	this.RYTIME_SEASON_DAYS = 90;
	this.RYTIME_MONTH_DAYS = 30;
	this.RYTIME_CYCLE_MONTHS = 12;
	this.RYTIME_JY_CYCLES = 4;
	this.RYTIME_WEEK_DAYS = 6;
	/* 0 = spring, 1 = summer, 2 = automn, 3 = winter */
	this.RYTIME_CYCLE_SEASONS = 4;
	/* Tick is offset on server of 61 days. */
	this.RYTIME_TICK_OFFSET = (61 * this.RYTIME_DAY_HOURS * this.RYTIME_HOUR_TICKS);

	this.RYTIME_START_JY = 2525;

	/* Helpers */
	this.RYTIME_CYCLE_DAYS = (this.RYTIME_CYCLE_MONTHS * this.RYTIME_MONTH_DAYS);
	this.RYTIME_JY_DAYS = (this.RYTIME_CYCLE_DAYS * this.RYTIME_JY_CYCLES);
	this.RYTIME_JY_MONTHS = (this.RYTIME_CYCLE_MONTHS * this.RYTIME_JY_CYCLES);

	this.year = year;
	this.cycle = cycle;
	this.month = month;
	this.day = day;
	this.hour = hour;
	this.season = season;

	this.day_of_jy = 0;
	this.day_of_cycle = 0;
	this.month_of_cycle = 0;
	this.day_of_month = 0;
	this.day_of_week = 0;
	this.day_of_season = 0;
	this.time_of_day = 0;

	this.cached = cached;
	this.helper = 0;

	this.days = new Array("Prima","Dua","Tria","Quarta","Quinteth","Holeth");
	this.months = new Array("Winderly","Germinally","Folially","Floris","Medis","Thermis","Harvestor","Frutor","Fallenor","Pluvia","Mystia","Nivia");
	this.seasons = new Array("Spring","Summer","Autumn","Winter");

	this.advanceToNow = function() {
		//differenz zwischen cached time und jetzt ausgleichen

		this.doTick()

		thisObj = this;
		window.setInterval(function(){thisObj.doTick();}, 60000);
	}

	this.doTick = function() {
		//missed ticks = (time - cached time) *10
		var now = new Date();
		var stamp = (now.getTime() / 1000);
		
		this.tick = this.basetick + Math.floor((stamp-this.cached)*10);
		this.helper++;
		
		this.hour = ((this.tick-this.RYTIME_TICK_OFFSET) / this.RYTIME_HOUR_TICKS);
		this.day = (this.hour / this.RYTIME_DAY_HOURS);
 
		this.year = (Math.floor(this.day / this.RYTIME_JY_DAYS) + this.RYTIME_START_JY);
		if(this.day < 0) {
			this.day = (this.RYTIME_JY_DAYS - Math.abs(this.day) % this.RYTIME_JY_DAYS);
		}

		this.day_of_jy = (this.day % this.RYTIME_JY_DAYS);
		this.month = Math.floor(this.day_of_jy / this.RYTIME_MONTH_DAYS);
 
		this.cycle = Math.floor(this.day_of_jy / this.RYTIME_CYCLE_DAYS);
		this.day_of_cycle = (this.day % this.RYTIME_CYCLE_DAYS);
		this.month_of_cycle = (this.month % this.RYTIME_CYCLE_MONTHS);
 
		this.day_of_month = (this.day_of_jy % this.RYTIME_MONTH_DAYS);
		this.day_of_week = (this.day % this.RYTIME_WEEK_DAYS);
 
		this.season = ((this.day / this.RYTIME_SEASON_DAYS) % this.RYTIME_CYCLE_SEASONS);
		this.day_of_season = (this.day % this.RYTIME_SEASON_DAYS);
 
		this.time_of_day = (Math.abs(this.hour) % this.RYTIME_DAY_HOURS);
		if(this.hour < 0 && this.time_of_day) {
			this.time_of_day = (this.RYTIME_DAY_HOURS - this.time_of_day);
		}
 
		this.draw();
	}

	this.draw = function() {
		this.obj.innerHTML = Math.floor(this.time_of_day)+"h - "+this.days[Math.floor(this.day_of_week)]+", "+this.months[Math.floor(this.month_of_cycle)]+" "+Math.floor(this.day_of_month+1)+"<br>"+Math.floor(this.cycle+1)+". AC "+Math.floor(this.year);
	}

}