Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
timezone [2020/02/20 18:17] – created lbrpdxtimezone [2022/06/12 10:37] (current) – moved troubleshooting info here atari
Line 1: Line 1:
-=====Timezone=====+====== Timezone ======
  
-By default, Batocera is configured for Central European Time (CET) timezone. To change it to your local time zone, you need to edit ''/userdata/system/batocera.conf'' and add/modify a line with: +By default, Batocera is configured for Central European Time (CET) timezone.
-  system.timezone=America/Los_Angeles+
  
 +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.
  
-To list all the suitable timezones and select yoursyou can [[access_the_batocera_via_ssh|connect to your Batocera system]] and type:+==== 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, [[:access_the_batocera_via_ssh|from SSH/terminal]] run:
   # ls /usr/share/zoneinfo/   # ls /usr/share/zoneinfo/
  
-This command returns several directories (each one being a group of time zones). Then you can select the exact timezone you want in the corresponding directoryBack to my example aboveI could select ''Los_Angeles'' from the output of+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 timezonesFor example, to see all the available options for ''Los_Angeles'', run the following
-  # ls /usr/share/zoneinfo/America/ +  # 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, [[https://wiki.archlinux.org/title/System_time#Time_standard|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 [[https://wiki.archlinux.org/title/System_time#UTC_in_Microsoft_Windows|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 value ''1'' named ''RealTimeIsUniversal''<WRAP center round help> 
 +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 of ''1''
 +</WRAP> 
 +  - 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): 
 + 
 +<file - UTCtimefix.reg> 
 +Windows Registry Editor Version 5.00 
 + 
 +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation] 
 +     "RealTimeIsUniversal"=dword:00000001 
 + 
 +</file> 
 + 
 +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'': 
 + 
 +<file bash boot-custom.sh> 
 +#!/bin/bash 
 + 
 +hwclock --systz --localtime 
 + 
 +</file> 
  • timezone.1582219061.txt.gz
  • Last modified: 4 years ago
  • by lbrpdx