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

255
Views
How to copy a CRM UTC Date field to another, client-side? It seems to be ignoring timezone... drops 1 day

A web request gives me '2022-03-01'.

I know that is and always will mean UTC 2022-03-01 at midnight exactly.

I need to copy that value onto another CRM date field on the Form

I tried:

var passDateToLib = Date('2022-03-01')
formContext.getAttribute("new_otherdatefield").setValue(passDateToLib)

That new_otherdatefield field is also configured to be a UTC Date only field.

But what ends up shown in the field, is 1 date BEFORE '2022-03-01'. So I suspect it's ignoring the timezone aspect of the Date...

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

0

toISOString() gives the time in ISO format. To get the date only as you mentioned we can use substring method to remove the time. This will basically give the date based on GMT and not for your Local TimeZone.

new Date().toISOString().substring(0,10);

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!