Timezone
By default, Batocera is configured for Central European Time (CET) timezone.
In Batocera v31 and higher, you can select your own timezone from the menu SYSTEM SETTINGS → TIMEZONE. From the same menu, you can also toggle the clock to 12-hour format if desired.
Older versions of Batocera
To adapt to your local time zone, you need to edit /userdata/system/batocera.conf
and add/modify a line with:
system.timezone=America/Los_Angeles
To list all the group names of the available timezone, from SSH/terminal run:
# ls /usr/share/zoneinfo/
This command returns several directories (each one being a group of time zones). In each of these directories are more directories that contain the actual timezones. For example, to see all the available options for Los_Angeles
, run the following:
# ls /usr/share/zoneinfo/America/
These instructions are still valid for Batocera v31 and higher, if you need to change them manually.
Troubleshooting
Batocera keeps resetting my clock whenever I boot back into Windows!
This is not actually Batocera, Windows will just overwrite the RTC value with the localized time, whereas Batocera uses the more globally accepted UTC time. If you'd rather not mess with Windows' registry at all, you can just tell Windows not to update the time via the Internet time. Right-click the time on your taskbar to get into its properties to change this. However, this will mean the time displayed on your Windows machine will not be correct. If you'd like correct time on both operating systems, read the following sections:
Fix this in Windows manually
The fix for this on Windows (summarized from the Arch wiki's page about it):
- Hit
[Winkey]
+[R]
and run “regedit”. Confirm administrator privileges - Make a backup by going to File → Export…
- Navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\
- Add a
DWORD
value with hexadecimal value1
namedRealTimeIsUniversal
For 64-bit versions of Windows 7 and older builds of Windows 10, there was a bug that made it necessary to have a
QWORD
value with hexadecimal value of1
. - Yeehaw, you're done. Windows might ask to update the clock, let it do so
Fix this in Windows automatically
You can also just download and install/import this reg file (if you trust strangers on the internet):
- UTCtimefix.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation] "RealTimeIsUniversal"=dword:00000001
Just double-click the file, or go to Regedit's File → Import… menu. It is strongly recommended to only use this on the later versions of Windows 10.
Changing Batocera to use Windows' local time instead
You can use a custom script in Batocera v32 and up to tell it to use the local time just like Windows does instead.
Put the following file into /boot/boot-custom.sh
:
- boot-custom.sh
#!/bin/bash hwclock --systz --localtime
- timezone.txt
- Last modified: 3 years ago
- by atari