I am have an idea on how I could get the time but its always in 24 hour format, how can I get it into being in a 12 hour format??
any suggestions??
I am have an idea on how I could get the time but its always in 24 hour format, how can I get it into being in a 12 hour format??
any suggestions??
2
Answers
You can use any js date-time library you prefer. For example https://date-fns.org/v2.29.3/docs/format
Regarding getting the proper timezone, first, you need to get your device’s timezone with
and then use this timezone with date-time library https://date-fns.org/v2.29.3/docs/Time-Zones
use Moment format to do that