The entrance will be encoded as an offset -0400 . Part 0400 will be returned as a tUNUMBER token (supposedly containing an unsigned value). This token complies with the grammar rules and can be used as $3 .
To get the actual offset in minutes from a value of 400 , you first need to split it into two halves. The hourly part can be obtained using $3 / 100 (i.e. 4 ), and part of the minutes with $3 % 100 (i.e. 0 ). Since there are 60 minutes per hour, you multiply the hours by 60 and add minutes to this ( $3 % 100 + ($3 / 100) * 60 ), which gives a value of 240 . Then all that remains is to add the character and save it in yyTimezone .
After that, yyTimezone will contain the time zone offset in minutes.
source share