Are you sure my issue is related to js date object? because i am passing it as string, not from date variable. to be on safer side i tried to date as tomorrow's date. of course i tried many combinations.
I tried the same code at 9:30 am and it worked ( got previous day's data) but not when i tried at 8:00 am or 8:30 or 9:00 am.
Are you sure my issue is related to js date object? because i am passing it as string, not from date variable.
We don't handle timezone while converting incoming timestamps from upstream (which is in IST). So if your local timezone is in IST then it will just parse the timestamp and show the timezone as IST. You can check the same by checking the last date response for minute interval : kc.getHistoricalData("134881540", "minute", "2024-04-20 00:00:01", "2024-04-25 23:59:59", false, false);
I tried the same code at 9:30 am and it worked ( got previous day's data) but not when i tried at 8:00 am or 8:30 or 9:00 am.
It worked because your local timezone stamp exceeded today's start date. You can debug the same at your end, from historical data response.
Are you sure my issue is related to js date object? because i am passing it as string, not from date variable.
to be on safer side i tried to date as tomorrow's date. of course i tried many combinations.
I tried the same code at 9:30 am and it worked ( got previous day's data) but not when i tried at 8:00 am or 8:30 or 9:00 am.
kc.getHistoricalData("134881540", "minute", "2024-04-20 00:00:01", "2024-04-25 23:59:59", false, false); It worked because your local timezone stamp exceeded today's start date. You can debug the same at your end, from historical data response.