text: const jstz = require("jstz");
  var moment_tz = require("moment-timezone");
  
  module.exports = () =>
  {
  	moment_tz.tz.load(require("./moment-latest.json"));
  	var tzd = jstz.determine()
  	const conf = require("./cdconf.json");
  	const ToTimeZone = (_time) =>
  	{
  		var format = 'YYYY/MM/DD HH:mm:ss ZZ';
  		return moment_tz.tz(_time.toString(),tzd.name()).format(format);
  	}
  	
  	const ToTimeZoneUTC = (_time) =>
  	{
  		var format = 'YYYY/MM/DD HH:mm:ss ZZ';
  		return moment_tz.tz(_time.toString(),"UTC").format(format);
  	}
  
  	const GetTimeRemaining = (_endtime) =>
  	{
  		var t = Date.parse(ToTimeZone(ToTimeZoneUTC(_endtime))) - Date.parse(ToTimeZone(new Date()));
  		var seconds = Math.floor( (t/1000) % 60 );
  		var minutes = Math.floor( (t/1000/60) % 60 );
  		var hours = Math.floor( (t/(1000*60*60)) % 24 );
  		var days = Math.floor( t/(1000*60*60*24) );
  		return {
  			'total': t,
  			'days': days,
  			'hours': hours,
  			'minutes': minutes,
  			'seconds': seconds
  		};
  	}
  
  	let endtime = ToTimeZone(ToTimeZoneUTC(conf.end));
  	$(".countdown_title").html(conf.title);
  	const Timer = setInterval(() =>
  	{
  		let e = ToTimeZone(ToTimeZoneUTC(endtime));
  		let n = ToTimeZone(new Date());
  		
  		let t = Date.parse(e) - Date.parse(n);
  		
  		if (t/1000 <= -86400)
  		{
  			$(".countdown_container").hide();
  		}
  
  		if (t >= 0) {
  
  
  			var seconds = GetTimeRemaining(endtime).seconds;
  			var minutes = GetTimeRemaining(endtime).minutes
  			var hours = GetTimeRemaining(endtime).hours;
  			var days = GetTimeRemaining(endtime).days;
  
  			$("#timer-days").html(days);
  			$("#timer-hours").html(("0"+hours).slice(-2));
  			$("#timer-mins").html(("0"+minutes).slice(-2));
  			$("#timer-secs").html(("0"+seconds).slice(-2));
  
  		} else {
  			$(".countdown_title").html(conf.end_title);
  			clearInterval(Timer);
  		}
  	},500)
  
  }