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

152
Views
Wrong date format on iOS in Ionic5 hybrid app (Appery.io platform)

I did not try that but I got it working now in xcode simulator. This function below works fine in Android but not in iPhone (Tracking-page):

const MyDate = new Date(timestamp + " UTC"); this.itemTimestamp = MyDate .toLocaleString();

In iPhone it gives INVALID DATE error.

I see the specification here: https://www.elliotjreed.com/blog/2019-03-20/invalid-date-format-in-javascript-on-ios-devices

But Appery says: "The Date type value is a string which contains a UTC timestamp stored in ISO 8601 format with millisecond precision: YYYY-MM-DDThh:mm:ss.mmm."(https://docs.appery.io/reference/database-api-data-types#date) I don't know if this is the issue in the platform or in the code of mine.. So what is the correct format for that platform with or w/o "Z" at the end?

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

0

iOS supports the ISO format only, like '2022-02-10T21:26:11.119Z'

Z is the time zone offset specified as “Z” (for UTC) or either

More details you can find here: https://262.ecma-international.org/5.1/#sec-15.9.1.15

So in the case, if you don't set the timezone the UTC will be selected automatically ("Z")

It is better to set the timezone every time to avoid issues with the wrong timezone

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!