-
Rucha Deodhar authored
Before starting to go over the format string, prepare the current time zone information incase '%z' or '%Z' is encountered. This information can be obtained as given below: A) If timezone is not set ( meaning we are working with system timezone): Get the MYSQL_TIME representation for current time and GMT time using current thread variable for timezone and timezone variable for UTC respectively. This MYSQL_TIME variable will be used to calculate time difference. Also convert current time in second to tm structure to get system timezone information. B) If timezone is set as offset: Get timezone information using current timezone information and store in appropriate variable. C) If timezone is set as some place (example: Europe/Berlin) Get timezone information by searching the timezone. During internal timezone search, information like timeoffset from UTC and abbrevation is stored in another relevant structure. Hence use the same information.
94eb8192