Check out example codes for "mysql jdbc timezone". It will help you in understanding the concepts better.

Code Example 1

String url =
 "jdbc:mysql://localhost/mydb?useLegacyDatetimeCode=false&serverTimezone=America/New_York";

Learn ReactJs, React Native from akashmittal.com