Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

146
Views
Make returned date reflect city searched and not local browser date

I've created a React weather app that returns various pieces of info when you search by city. One of those pieces of info is the date. My problem is that the date returned reflects the date of the location where the browser is located. For example, if it is "12/20/2021" and I'm in Chicago but it's "12/21/2021" in Shanghai, when I search Shanghai from Chicago it shows the date as "12/20/2021" instead of the date in Shanghai. How can I get my app to reflect the date based upon the city being searched instead of based on where the user is located?

Thanks

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This Stack Overflow question may be of use; in particular this answer provides steps for how to translate your city first into its corresponding time zone, and then fetch the current time and date for that corresponding time zone.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!