Noob Time Question

So I’m a lowly Mac user, with some older Mac hardware I’d like to re-purpose for NAS. I’ve managed to get RockStor installed, get some drives configured, pools, made, users and shares halfway up and running, and installed a RockOn package or two. I still have a long way to go, but the documentation is pretty clear and I think I can get from where I am to where I’d like to be. BUT, I can’t seem to find out where / how to set the time. I’ve gone to the Services, and changed the time server to something else, but still don’t see a way to set the time. I’m HOPING there is a GUI way to do this, but will wade into the shell/ command line interface if necessary.

@jlthla, welcome to the community forums. I believe, unless that has changed, there is no setting to adjust it in Rockstor itself.

Since you’re willing to wade into the shell, once you’re in there, can you run this command to show what your situation is:
timedatectl

		  Local time: Wed 2020-04-08 09:44:01 PDT
	  Universal time: Wed 2020-04-08 16:44:01 UTC
			RTC time: Wed 2020-04-08 16:44:01
		   Time zone: America/Los_Angeles (PDT, -0700)
		 NTP enabled: no
	NTP synchronized: yes
	 RTC in local TZ: no
		  DST active: yes
	 Last DST change: DST began at
					  Sun 2020-03-08 01:59:59 PST
					  Sun 2020-03-08 03:00:00 PDT
	 Next DST change: DST ends (the clock jumps one hour backwards) at
					  Sun 2020-11-01 01:59:59 PDT
					  Sun 2020-11-01 01:00:00 PST

What’s the difference between what your time and time zone is at the time of executing that command is obviously where I am going with this :slight_smile:

  1. To change the date (year-month-day)
    timedatectl set-time [YYYY-MM-DD]
  2. To change the time (hours:minutes:seconds):
    timedatectl set-time [HH:MM:SS]
  3. To maintain the system clock in local time (i.e. the time zone you’re already in or setting the system to):
    timedatectl set-local-rtc yes and if not (like I have): timedatectl set-local-rtc no
  4. For timezone setting:
    First list the available time zones with this:
    timedatectl list-timezones
    That will show you a list that’s a few pages long (to exit that list, just hit and that will drop you back to the command prompt) - find the appropriate time zone and note down the complete string (e.g. “Europe/Vienna”).

Then pick the one applicable to you and run:
timedatectl set-timezone <timezonename>,
e.g.
timedatectl set-timezone Europe/Vienna

I know, you only asked for time change, but I figured for completeness I’d list the other pieces to it, as well. the timedatectl has more operations, also involving the setup of the ntp server (and other settings related to the times and dates). But since the ntp server connection functionality is exposed through the WebUI I would use that to change it (as you’ve already found).

4 Likes

Dan. As it turns out, because I’m just getting started and didn’t have much setup already, in re-reading the install instructions, I see where I went wrong, and just started over, and fixed the issue in the Install GUI. For now, all is well. BUT, your answer is very welcome, as I’m not so up on shell stuff, but you’ve done a super job of making it seem simply… and definitely something I can do. This is going in my HELP file. Thanks again.

3 Likes