There are plenty of ways to do this. There are also many third party libraries for this purpose.
1. How to Get Timezone
Typically, developers use time zone offset to calculate timezone but it can give erroneous results since these offset values can change from time to time, such as daylight savings. Instead, you can get IANA (Internet Assigned Network Authority) timezone of your client using Intl object as shown below.
2. How to Get Offset
Timezone offset is the difference in minutes (positive or negative) between UTC (Universal Coordinated Time) and your local time. If the offset is positive, it means that your local timezone is behind UTC while negative offset means it is ahead of UTC. You can get timezone offset for your client using getTimezoneOffset() function.
var offset = new Date().getTimezoneOffset(); console.log(offset); // if offset equals -60 then the time zone offset is UTC+01
How to Check if JS Object has Property
How to Auto Increment With Prefix As Primary Key in MySQL
How to Set Initial Value & Auto Increment in MySQL
How to Create DMARC Record for your Domain
MySQL Query to Get Column Names from Table