Time zone strings such as America/Halifax and Asia/Kolkata refer to entries in the so-called zoneinfo database. Read it. https://www.iana.org/time-zones. It is currently supported by the Internet Office of Assigned Numbers. He is changing a lot, because his companion is trying to keep up with changes in the rules for daylight saving and other political issues.
On UNIX-like systems, entries are stored in the file system directory hierarchy, and not by any code number. This is a successful implementation of my proposal. You can see how it works.
You asked:
Keep a whole row of America/Los_Angeles
Yes.
is there any integer id for it?
Not if you want your application and database to be future-oriented. In the MySQL part, there is time_zone_id that contains the zoneinfo data, but no one made any promises about keeping these numbers intact.
The longest row in the current database (2019b) is America/Argentina/ComodRivadavia . These are 32 characters in length. The mysql.time_zone_name table has a Name column defined with 64 characters. It makes sense to use VARCHAR(64) to store this information; this corresponds to how the names are stored in the system.
By the way, WordPress offers the user a selection list (drop-down list) of available time zone names and saves the user's choice in the form of text. This is a great role model.
http://www.iana.org/time-zones
O. jones
source share