By default, an OpenWRT router operates in the UTC (Universal Time Coordinate) time zone.
OpenWRT stores the time zone inside a file named
/etc/TZ. If this file is missing or empty, OpenWRT assumes the local time equals UTC time. The format is pretty strange, and has the following syntax:
syntax ::= GMT
offset ::= (+|-)
hour ::= [ 00 - 12 ]
is the value you must add to or substract from the local time to get the UTC time. This offset will be positive if the local time zone is west of the Prime Meridian and negative if it is east. For example, TZ must be set to GMT-1 for Madrid, which is GMT+1:
# echo GMT-1 > /etc/TZ
UPDATED: The syntax for the TZ variable is documented here.
Following this document, the correct contents for file
/etc/TZ when located in Madrid would be: