{
	"id": "aeef377a-fcc3-4ded-91b4-c15132cfb283",
	"created_at": "2026-04-06T00:13:31.481575Z",
	"updated_at": "2026-04-10T03:24:17.849937Z",
	"deleted_at": null,
	"sha1_hash": "02bbbc2164a63432960e2f7f94e2e26687377a73",
	"title": "System time - ArchWiki",
	"llm_title": "",
	"authors": "",
	"file_creation_date": "0001-01-01T00:00:00Z",
	"file_modification_date": "0001-01-01T00:00:00Z",
	"file_size": 141622,
	"plain_text": "System time - ArchWiki\r\nArchived: 2026-04-05 17:54:23 UTC\r\nThis article or section needs expansion.\r\nReason: This article mostly documents systemd timedatectl; explain basic commands like date and hwclock first\r\n(Discuss in Talk:System time)\r\nIn an operating system, the time (clock) is determined by three parts: time value, whether it is local time or UTC\r\nor something else, time zone, and Daylight Saving Time (DST) if applicable. This article explains what they are\r\nand how to read/set them. Two clocks are present on systems: a hardware clock and a system clock which are also\r\ndetailed in this article.\r\nStandard behavior of most operating systems is:\r\nSet the system clock from the hardware clock on boot.\r\nKeep accurate time of the system clock, see #Time synchronization.\r\nSet the hardware clock from the system clock on shutdown.\r\nTime standard\r\nThere are two time standards: localtime and Coordinated Universal Time (UTC). The localtime standard is\r\ndependent on the current time zone, while UTC is the global time standard and is independent of time zone values.\r\nThough conceptually different, UTC is also known as GMT (Greenwich Mean Time).\r\nThe standard used by the hardware clock (CMOS clock, the BIOS time) is set by the operating system. By default,\r\nWindows uses localtime, macOS uses UTC, other UNIX and UNIX-like systems vary. An OS that uses the UTC\r\nstandard will generally consider the hardware clock as UTC and make an adjustment to it to set the OS time at\r\nboot according to the time zone.\r\nHardware clock\r\nThe hardware clock (a.k.a. the Real Time Clock (RTC) or CMOS clock) stores the values of: Year, Month, Day,\r\nHour, Minute, and Seconds. A UEFI firmware has the additional ability to store the timezone, and whether DST is\r\nused.\r\nRead hardware clock\r\n# hwclock --show\r\nSet hardware clock from system clock\r\nhttps://wiki.archlinux.org/title/System_time\r\nPage 1 of 10\n\nThe following sets the hardware clock from the system clock. Additionally it updates /etc/adjtime or creates it\r\nif not present. See hwclock(8) § The Adjtime File for more information on this file as well as the #Time skew\r\nsection.\r\n# hwclock --systohc\r\nAutomatic syncing\r\nBy default, Arch Linux kernels have a feature enabled where the hardware clock is synchronized to the system\r\nclock every 11 minutes. You can see if this is enabled on your kernel as follows:\r\n$ zgrep CMOS /proc/config.gz\r\nCONFIG_GENERIC_CMOS_UPDATE=y\r\nCONFIG_RTC_DRV_CMOS=y\r\nThe first synchronization happens at boot time. What this means is that if your hardware clock is extremely out of\r\ndate (for example, a CMOS battery failure has reset the clock to the year 2000) then for the first 11 minutes after\r\nboot anything which requires a reasonably accurate time will give an error - including SSL, uses the Online\r\nCertificate Status Protocol (OCSP). A web browser running on your computer typically sends the hardware clock\r\ntime in its requests to websites, and a time which is too far out will result in the browser refusing to connect\r\nbecause of an OCSP error.\r\nSystem clock\r\nThe system clock (a.k.a. the software clock) keeps track of: time, time zone, and DST if applicable. It is\r\ncalculated by the Linux kernel as the number of seconds since midnight January 1st 1970, UTC. The initial value\r\nof the system clock is calculated from the hardware clock, dependent on the contents of /etc/adjtime . After\r\nboot-up has completed, the system clock runs independently of the hardware clock. The Linux kernel keeps track\r\nof the system clock by counting timer interrupts.\r\nRead clock\r\nTo check the current system clock time (presented both in local time and UTC) as well as the RTC (hardware\r\nclock):\r\n$ timedatectl\r\nSet system clock\r\nTo set the local time of the system clock directly:\r\nhttps://wiki.archlinux.org/title/System_time\r\nPage 2 of 10\n\n# timedatectl set-time \"yyyy-MM-dd hh:mm:ss\"\r\nFor example:\r\n# timedatectl set-time \"2014-05-26 11:13:54\"\r\nsets the time to May 26th, year 2014, 11:13 and 54 seconds.\r\nMultiple systems\r\nIf multiple operating systems are installed on a machine, they will all derive the current time from the same\r\nhardware clock: it is recommended to set it to UTC to avoid conflicts across systems. Otherwise, if the hardware\r\nclock is set to localtime, more than one operating system may adjust it after a DST change for example, thus\r\nresulting in an over-correction; problems may also arise when traveling between different time zones and using\r\none of the operating systems to reset the system/hardware clock.\r\nThe hardware clock can be queried and set with the timedatectl command. You can see the current hardware\r\nclock time standard of the Arch system using:\r\n$ timedatectl | grep local\r\nRTC in local TZ: no\r\nTo change the hardware clock time standard to localtime, use:\r\n# timedatectl set-local-rtc 1\r\nTo revert to the hardware clock being in UTC, type:\r\n# timedatectl set-local-rtc 0\r\nThese generate /etc/adjtime automatically and update the RTC accordingly; no further configuration is\r\nrequired.\r\nDuring kernel startup, at the point when the RTC driver is loaded, the system clock may be set from the hardware\r\nclock. Whether this occurs depends on the hardware platform, the version of the kernel and kernel build options. If\r\nthis does occur, at this point in the boot sequence, the hardware clock time is assumed to be UTC and the value of\r\n/sys/class/rtc/rtcN/hctosys (N=0,1,2,..) will be set to 1.\r\nLater, the system clock is set again from the hardware clock by systemd, dependent on values in /etc/adjtime .\r\nHence, having the hardware clock using localtime may cause some unexpected behavior during the boot sequence;\r\ne.g system time going backwards, which is always a bad idea (there is a lot more to it). Since systemd version 216,\r\nhttps://wiki.archlinux.org/title/System_time\r\nPage 3 of 10\n\nwhen the RTC is configured to the local time (rather than UTC) systemd will never synchronize back to it, as this\r\nmight confuse Windows at a later boot. And systemd will no longer inform the kernel about the current timezone.\r\nThis hence means FAT timestamps will be always considered UTC[1].\r\nNote\r\nThe use of timedatectl requires an active D-Bus. Therefore, it may not be possible to use this command\r\nunder a chroot (such as during installation). In these cases, you can revert back to the hwclock command,\r\nor use systemd-nspawn instead of chroot.\r\nIf /etc/adjtime is not present, systemd assumes the hardware clock is set to UTC.\r\nUTC in Microsoft Windows\r\nTo dual boot with Windows, it is recommended to configure Windows to use UTC, rather than Linux to use\r\nlocaltime. (Windows by default uses localtime [2].)\r\nIt can be done by a simple registry fix: Open regedit and add a DWORD value with hexadecimal value 1 to the\r\nregistry HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation\\RealTimeIsUniversal\r\nYou can do this from an Administrator Command Prompt running:\r\nC:\\\u003ereg add \"HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\TimeZoneInformation\" /v RealTimeIsUn\r\nAlternatively, create a *.reg file (on the desktop) with the following content and double-click it to import it into\r\nregistry:\r\nWindows Registry Editor Version 5.00\r\n[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation]\r\n\"RealTimeIsUniversal\"=dword:00000001\r\nShould Windows ask to update the clock due to DST changes, let it. It will leave the clock in UTC as expected,\r\nonly correcting the displayed time.\r\nThe #Hardware clock and #System clock time may need to be updated after setting this value.\r\nIf you are having issues with the offset of the time, try reinstalling tzdata and then setting your time zone again:\r\n# timedatectl set-timezone America/Los_Angeles\r\nUTC in Ubuntu/Fedora\r\nMany Linux distributions have the hardware clock set to be interpreted as in \"localtime\" if Windows was detected\r\non any disk during their installation. This is apparently done deliberately to allow new users to try out Linux on\r\ntheir Windows computers without editing the registry.\r\nhttps://wiki.archlinux.org/title/System_time\r\nPage 4 of 10\n\nFor changing this behavior, see above.\r\nMulti-NTP interaction\r\nIf you use an NTP client (see #Time synchronization below) that keeps track of RTC drift on any system, you\r\nshould disable time synchronization on all but one system. Otherwise the NTP clients would be unaware of each\r\nother's adjustment and make grossly incorrect estimates of the RTC drift.\r\nFor Windows, go to the Date and time settings and uncheck the time sync option. You can also run w32tm\r\n/unregister as an administrator to unregister the time-sync service: Active Directory machines are known to\r\nignore the synchronization settings and perform a synchronization anyways to prevent replay attacks. The\r\nWindows clock synchronization routine is quite inaccurate to start with, requiring even extra work to reach one-second accuracy, so disabling it should not be much of a loss.\r\nTime zone\r\nTo check the current zone defined for the system:\r\n$ timedatectl status\r\nTo list available zones:\r\n$ timedatectl list-timezones\r\nTo set your time zone:\r\n# timedatectl set-timezone Area/Location\r\nWhere Area is a continent or ocean, and Location is a specific location within the area. North and South\r\nAmerica share the same area— America .[3]\r\nExample:\r\n# timedatectl set-timezone America/Toronto\r\nThis will create an /etc/localtime symlink that points to a zoneinfo file under /usr/share/zoneinfo/ . In case\r\nyou choose to create the link manually (for example during chroot where timedatectl will not work), keep in\r\nmind that it must be a symbolic link, as specified in localtime(5) § DESCRIPTION:\r\n# ln -sf /usr/share/zoneinfo/Area/Location /etc/localtime\r\nTip The time zone can also be selected interactively with tzselect.\r\nhttps://wiki.archlinux.org/title/System_time\r\nPage 5 of 10\n\nSee timedatectl(1) and localtime(5) for details.\r\nSetting based on geolocation\r\nNote Some desktop environments have support for automatic time zone selection (e.g. see GNOME#Date \u0026\r\ntime).\r\nTo set the timezone automatically based on the IP address location, one can use a geolocation API to retrieve the\r\ntimezone, for example curl https://ipapi.co/timezone , and pass the output to timedatectl set-timezone\r\nfor automatic setting. Some geo-IP APIs that provide free or partly free services are listed below:\r\nAbstract IP geolocation API\r\nFreegeoIP\r\nIP-api\r\nIPAPI\r\nIpdata\r\nIpstack\r\nUpdate timezone every time NetworkManager connects to a network\r\nSee NetworkManager#Automatically set the timezone.\r\nTime skew\r\nEvery clock has a value that differs from real time (the best representation of which being International Atomic\r\nTime); no clock is perfect. A quartz-based electronic clock keeps imperfect time, but maintains a consistent\r\ninaccuracy. This base 'inaccuracy' is known as 'time skew' or 'time drift'.\r\nWhen the hardware clock is set with hwclock , a new drift value is calculated in seconds per day. The drift value\r\nis calculated by using the difference between the new value set and the hardware clock value just before the set,\r\ntaking into account the value of the previous drift value and the last time the hardware clock was set. The new\r\ndrift value and the time when the clock was set is written to the file /etc/adjtime overwriting the previous\r\nvalues. The hardware clock can therefore be adjusted for drift when the command hwclock --adjust is run; this\r\nalso occurs on shutdown but only if the hwclock daemon is enabled, hence for Arch systems which use systemd,\r\nthis does not happen.\r\nNote If the hwclock has been set again less than 24 hours after a previous set, the drift is not recalculated as\r\nhwclock considers the elapsed time period too short to accurately calculate the drift.\r\nIf the hardware clock keeps losing or gaining time in large increments, it is possible that an invalid drift has been\r\nrecorded (but only applicable, if the hwclock daemon is running). This can happen if you have set the hardware\r\nclock time incorrectly or your time standard is not synchronized with a Windows or macOS install. The drift value\r\ncan be removed by first removing the file /etc/adjtime , then setting the correct hardware clock and system\r\nclock time. You should then check if your time standard is correct.\r\nhttps://wiki.archlinux.org/title/System_time\r\nPage 6 of 10\n\nNote If you wish to make use of the drift value stored in /etc/adjtime even when using systemd, (e.g. you\r\ncannot or do not want to use NTP), you must call hwclock --adjust on a regular basis, perhaps by creating a\r\ncron job.\r\nThe software clock is very accurate but like most clocks is not perfectly accurate and will drift as well. Though\r\nrarely, the system clock can lose accuracy if the kernel skips interrupts. There are some tools to improve software\r\nclock accuracy:\r\nSee #Time synchronization.\r\nTime synchronization\r\nThe Network Time Protocol (NTP) is a protocol for synchronizing the clocks of computer systems over packet-switched, variable-latency data networks.\r\nNetwork Time Protocol (NTP)\r\nFor proper NTP support, as defined by the RFC, a client must be able to merge time from multiple servers,\r\ncompensate for delay, and keep track of drift on the system (software) clock. The following are implementations\r\nof NTP available for Arch Linux:\r\nChrony — A client and server that is roaming friendly and designed specifically for systems that are not\r\nonline all the time. Converges faster and closer to reference than ntpd in most cases. Can also keep track of\r\nhardware clock (RTC) drift.\r\nhttps://chrony-project.org/ || chrony\r\nNetwork Time Protocol daemon — The reference implementation of the protocol.\r\nhttps://www.ntp.org/ || ntp\r\nntpd-rs — A full-featured implementation of NTP with NTS support.\r\nhttps://docs.ntpd-rs.pendulum-project.org/ || ntpd-rs\r\nNTPsec — A fork of NTPd, focused on security. Works similarly, except a lot of old code is thrown out.\r\nhttps://ntpsec.org/ || ntpsecAUR\r\nSimple Network Time Protocol (SNTP)\r\nAnything that does less than a proper NTP node is considered Simple Network Time Protocol (SNTP). A basic\r\nSNTP client may simply fetch the time from a single server and set it immediately, without keeping track of long-term drifts. SNTP provides lower accuracy, but takes less resources. The accuracy is usually good enough for\r\ndesktop users and embedded workloads, but unacceptable for NTP servers. The following implement SNTP:\r\nConnMan — A lightweight network manager with SNTP support.\r\nhttps://wiki.archlinux.org/title/System_time\r\nPage 7 of 10\n\nhttps://01.org/connman (waybackmachine) || connman\r\nntpclient — A simple command-line SNTP client.\r\nhttp://doolittle.icarus.com/ntpclient/ || ntpclientAUR\r\nOpenNTPD — Part of the OpenBSD project and implements both an SNTP client and a server. No leap\r\nsecond support.\r\nhttps://www.openntpd.org/ || openntpd\r\nsntp — An SNTP client that comes with NTPd. It supersedes ntpdate and is recommended in non-server\r\nenvironments.\r\nhttps://www.ntp.org/ || ntp\r\nsystemd-timesyncd — A simple SNTP daemon that only implements a client side, focusing only on\r\nquerying time from one remote server. It should be more than appropriate for most installations.\r\nhttps://systemd.io/ || systemd\r\nPer-user/session or temporary settings\r\nFor some use cases it may be useful to change the time settings without touching the global system values. For\r\nexample to test applications relying on the time during development or adjusting the system time zone when\r\nlogging into a server remotely from another zone.\r\nTo make an application \"see\" a different date/time than the system one, you can use the faketime(1) utility (from\r\nlibfaketime).\r\nIf instead you want an application to \"see\" a different time zone than the system one, set the TZ environment\r\nvariable, for example:\r\n$ date \u0026\u0026 export TZ=\":/usr/share/zoneinfo/Pacific/Fiji\" \u0026\u0026 date\r\nTue Nov 1 14:34:51 CET 2016\r\nWed Nov 2 01:34:51 FJT 2016\r\nThis is different than just setting the time, as for example it allows to test the behavior of a program with positive\r\nor negative UTC offset values, or the effects of DST changes when developing on systems in a non-DST time\r\nzone.\r\nAnother use case is having different time zones set for different users of the same system: this can be\r\naccomplished by setting the TZ variable in the shell's configuration file, see Environment variables#Defining\r\nvariables.\r\nhttps://wiki.archlinux.org/title/System_time\r\nPage 8 of 10\n\nTips and tricks\r\nfake-hwclock\r\nalarm-fake-hwclock designed especially for system without battery backed up RTC, it includes a systemd service\r\nwhich on shutdown saves the current time and on startup restores the saved time, thus avoiding strange time travel\r\nerrors.\r\nInstall fake-hwclock-gitAUR, start/enable the service fake-hwclock.service .\r\nVirtual PTP\r\nVirtual machine guests may obtain time from the host machine using the PTP (Precision Time Protocol)\r\n/dev/ptp0 interface. The interface is more accurate compared to using NTP over IP between the host and guest.\r\nOn KVM machines, the ptp_kvm kernel module needs to be loaded to provide a virtual PTP device. See\r\nVM timekeeping: Using the PTP Hardware Clock on KVM.\r\nOn Hyper-V machines, the guest integration should spawn a /dev/ptp0 without additional configuration.\r\nchrony and ntpd can each use the virtual-PTP device to sync the time between guest and host, by configuring the\r\ndevice as if it is a real PTP reference clock.\r\nTroubleshooting\r\nClock shows a value that is neither UTC nor local time\r\nThis might be caused by a number of reasons. For example, if your hardware clock is running on local time, but\r\ntimedatectl is set to assume it is in UTC, the result would be that your timezone's offset to UTC effectively gets\r\napplied twice, resulting in wrong values for your local time and UTC.\r\nTo force your clock to the correct time, and to also write the correct UTC to your hardware clock, follow these\r\nsteps:\r\nSetup ntpd (enabling it as a service is not necessary).\r\nSet your time zone correctly.\r\nRun ntpd -qg to manually synchronize your clock with the network, ignoring large deviations between\r\nlocal UTC and network UTC.\r\nRun hwclock --systohc to write the current software UTC time to the hardware clock.\r\nSee also\r\nLinux Tips - Linux, Clocks, and Time\r\nAn introduction to timekeeping in Linux VMs\r\nSources for Time Zone and Daylight Saving Time Data for tzdata\r\nTime Scales\r\nGentoo: System time\r\nhttps://wiki.archlinux.org/title/System_time\r\nPage 9 of 10\n\nWikipedia:Time\r\nSource: https://wiki.archlinux.org/title/System_time\r\nhttps://wiki.archlinux.org/title/System_time\r\nPage 10 of 10",
	"extraction_quality": 1,
	"language": "EN",
	"sources": [
		"MITRE"
	],
	"references": [
		"https://wiki.archlinux.org/title/System_time"
	],
	"report_names": [
		"System_time"
	],
	"threat_actors": [
		{
			"id": "eb3f4e4d-2573-494d-9739-1be5141cf7b2",
			"created_at": "2022-10-25T16:07:24.471018Z",
			"updated_at": "2026-04-10T02:00:05.002374Z",
			"deleted_at": null,
			"main_name": "Cron",
			"aliases": [],
			"source_name": "ETDA:Cron",
			"tools": [
				"Catelites",
				"Catelites Bot",
				"CronBot",
				"TinyZBot"
			],
			"source_id": "ETDA",
			"reports": null
		}
	],
	"ts_created_at": 1775434411,
	"ts_updated_at": 1775791457,
	"ts_creation_date": 0,
	"ts_modification_date": 0,
	"files": {
		"pdf": "https://archive.orkl.eu/02bbbc2164a63432960e2f7f94e2e26687377a73.pdf",
		"text": "https://archive.orkl.eu/02bbbc2164a63432960e2f7f94e2e26687377a73.txt",
		"img": "https://archive.orkl.eu/02bbbc2164a63432960e2f7f94e2e26687377a73.jpg"
	}
}