New Date() giving me tomorrow's date

#1

Does expo have the date on apps set to the future? Whenever I call new Date(), I’m getting a date in the future.

#2

Expo uses JavaScriptCore & React Native’s implementation of new Date() – are you sure that the device you’re using has its date and locale set correctly?

#3

I’m on my phone which has the right day. My simulator is actually a day behind for some reason. But both are logging tomorrow’s date.

#4

There is a chance it’s printing the date in a different timezone than the one you expect when it’s stringified. For example, right now, UTC is is the next day w.r.t PST.

#5

It may have been this. I started pulling out the day and month and it works now.