Check out example codes for "eosio get time". It will help you in understanding the concepts better.

Code Example 1

uint32_t now(){return current_time_point().sec_since_epoch();}

Learn ReactJs, React Native from akashmittal.com