-
Date problem with GMT
Hello everyone, i have a little problem with Date script. I have date counter which is counting days from set date and count to some number of days whcich we can set too. The problem is with date 25th of october 2020. At my computer script place two dates 25/10 in list of counted dates. Anyone can tell me why AE change time zone and double some days with different time zone? Is there any way to get date without timezone or with UTC 0 or maybe it’s a “little bug” in AE? Thank you all for your help.
here’s my simple script
///////////
var day_slider = thisComp.layer(“CONTROL”).effect(“DAY”)(“Slider”); // set here “1”
var month_slider = thisComp.layer(“CONTROL”).effect(“MONTH”)(“Slider”);// set here “10”
var year_slider = thisComp.layer(“CONTROL”).effect(“YEAR”)(“Slider”);// set here “2020”
var how_many_days = thisComp.layer(“CONTROL”).effect(“HOW_MANY_DAYS”)(“Slider”);// set here for example “60”
var date_from_slider = month_slider+”.”+day_slider+”.”+year_slider;
var msPerDay = 24*60*60*1000;
var start_date = new Date(date_from_slider);
var timer = start_date.getTime();
var lista = new Array();
for (j=0;j<=how_many_days;j++){
my_variable = timer +(j * msPerDay);
my_variable = new Date(my_variable);
lista.push(my_variable+”\n”);
}
lista;
///////////////////////