Q:

Is there any way to change theme mode of App(UI) to dark or light dynamically based on user's Local time using React-Native?

I have tried Bellow code but still no luck ...
I'm getting the error: AppThemeState is undefined .
import { AppThemeState } from 'react-native';

const bannerContainerStyle =
AppThemeState.currentTheme === 'dark' ? styles.mainContainerViewDark : styles.mainContainerViewLight;

A:

export const getCurrentAuTime = () => {
  return moment
    .duration(
      moment
        .default()
        .tz('Australia/Melbourne')
        .format('HH:mm:ss'),
    )
    .asSeconds();
  //return 32401;
};

