All,
I have created a 90 step synthetic, which is to create a quote. https://www.qbe.com/au/home-insurance - it is open for the world to access and generate a quote for a policy in Home or Insurance, these were the products i was looking at.
The issue is, I am in UK (UTC+1 / GMT+1 / BST), so AEST (Australia) passes into a new day currently 9 hours ahead of me. So when i record the synthetic, i set my OS timezone to Sydney (if i do not, when we hit 3pm (GMT+1), the website 2nd page, after you hit get a quote, it auto generates the date and you can not change it, is it set to today.
I spoke to DynatraceONE, who gave me a script for changing the date to be updated 1 day ahead. But I need a script which updates it by 10 Hours. I was wondering if anyone has done this before and what people do for synthetics they want running in a specific timezone from the public locations?
Can anyone help me update the below to have 10 hours instead of 1 day (24 hours)?
Increment by a day script:
var today = new Date();
today.setDate(today.getDate()+1);
dateformat= today.getFullYear() + “-” + (“0” + (today.getMonth() + 1)).slice(-2) + “-” + (“0” + today.getDate()).slice(-2) ;
function addDays(date, numDays) {
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + numDays);
}
function date_format(date)
{
var month = date.getMonth() + 1;
var twoDigitMonth = (month < 10) ? (‘0’ + month) : month;
var twoDigitDate = (date.getDate() < 10) ? (‘0’ + date.getDate()) : date.getDate();
// return (twoDigitDate + ‘-’ + twoDigitMonth + ‘-’ + date.getFullYear());
return (date.getFullYear() + ‘-’ + twoDigitMonth + ‘-’ + twoDigitDate);
}
var todayDate = new Date();
var dateTomorrow = addDays(todayDate, 1);
var dateformat = date_format(dateTomorrow);
api.info("dateformat: " + dateformat);
api.setValue(“dateformat”, dateformat);
