Reputation: 1093
I'm making a react-native app, but i don't understand how, but on android, the date feel like do not change by what i set.
So i have a function to show date, look like this
const showDate = dateFormat.toLocaleString("default", {
month: "short",
day: "2-digit",
});
So weird that it will display so diffrent on android and ios
For android, it display like this, feel like this function do not effect android:
And here is when it show in ios
The different thing i noiticed is android use old time, like when i do not boot emulator, it freeze time, but i don't know what make time display so different on both devices
Please help, thank a lots
Upvotes: 1
Views: 1196
Reputation: 419
Don’t worry it’s normal it’s just broken on android. Look at moment.js library it works fine on iOS and android.
Moment(date).format('DD/MM/YYYY, hh:mm:ss')
Output is 11/11/2019, 1:17:00
Upvotes: 2