Open mahalakshme opened 2 months ago
our dates are like "2024-03-23T06:08:45.000Z" in the offline db. Using Z in the timestamp means UTC. When we display the date using console.log we are shown the date in human friendly timezone converted format. Check this link for more on date being initialised with string - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format
moment(new Date("2024-08-31T18:30:00.000Z")).format("MMMM")
gives out correct month which is September.@petmongrels where is the conversion happening? How does it know it needs to convert to IST?
The timezone comes from the JS runtime environment. It is just the display that is changed. We can use sensors feature to test this out. Same date will be shown differently by changing the geolocation - https://www.youtube.com/watch?v=pIpN_AuV4AI
Steps:
AC:
Need:
The above is needed because as per the implementation team, the conversion doesn't happen. Identifying where we are doing the above, will help us to identify if any edge cases exist, that needs to be fixed.
Old: Ignore
Have a configuration - of country somewhere
Inputs: