Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

42
Views
Have Javascript recognize YYYYmmdd in +5:00 Time Zone

thanks for taking the time to read my question.

At a high level I have a project that receives a file every day whose name ends in a date formatted yyyymmdd (file_20211118.xml would be today's file). The project reads data from the file and displays it on the web.

So the project only updates on the next day and after it receives a new file I have some javascript that looks like this

var todaysDateyyyymmdd = new Date().toISOString().slice(0,10).replace(/-/g,"");

xhttp.open("GET", "file_" + todaysDateyyyymmdd + ".xml", true);

I am in the EST time zone. The process works great for me until 7:00PM EST when everything disappears from the web. I am assuming it is because todaysDateyyyymmdd no longer equals the date on the file (maybe even specific to my browser time). I just can't figure out what to do to extend todaysDateyyyymmdd +5:00.

Any ideas would be greatly appreciated.

7 months ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.