The short answer is yes, but it's a bit more complicated than that.
Since the Raspberry Pi lacks a Real Time Clock (RTC) module, the device is able to communicate with an NTP server in order to configure the time properly. If not, it can be off by several years. As such, you need to either configure the system to connect to a local NTP server, or use some alternative method to set the time (such as htdate).
Alternatively, you can add a Real Time Clock to your Raspberry Pi.