2

I`m building a responsive website using reactjs that should support both android and iOS devices. In my code I am using javascript Date objects to render a calendar. when testing on android devices it works fine, but when testing on iOS it seems that the date objects are somehow influenced/manipulated by the UTC + 00:00 timezone so if the device's current timezone is +3:00 and it should display the hour of 8:00 it displays 11:00 instead. I tried to resolve this issue using the moment-timezone library but it only gives me the ability of formatting dates into strings, and I have 3rd party components that should receive javascript Dates as props(not strings).

btw- I found out that when changing the iOS device default timezone to be just "UTC" it works fine and the dates aren't being manipulated, but I can`t force my customer into working like that. please share your thoughts on a better way to resolve my problem.

Aramis312
  • 33
  • 2
  • Possible duplicate of [What are valid Date Time Strings in JavaScript?](https://stackoverflow.com/questions/51715259/what-are-valid-date-time-strings-in-javascript) – str Aug 23 '18 at 12:39

0 Answers0