5

What is the correct way of setting the timezone (CentralEuropeanTime... or now rather CET with Daylight Savings Time) on the latest version of OpenIndiana Hipster?

I've tried a changing a few things in /etc/, but I'm obviously not doing it right, since my clock remains at Universal-time (UTC). A similar question (for Solaris?) suggested a command, but this isn't available on OpenIndiana - nor is the package it was supposed to be in.

I got a multi-boot system, so I want to keep the system clock in Universal (UTC), rather than in local-time (CET).

So what exactly should I do - where and how?
(I guess the easiest would be to just make, edit or link a file in /etc, or something if possible...)

2
  • 1
    What files have you tried changing?
    – schaiba
    Mar 26, 2017 at 15:07
  • I tried setting /etc/timezone - but it's possibly I did it wrong... I put in the line "Europe/Oslo MyHostName". I also tried to copy the zone-info file for "Europe/Oslo" to /etc/localtime. I should perhaps note that my LANG=en_US.UTF-8 and my keyboard is set to Norwegian... The time shown is UTC/GMT - the same as the computer's hardware clock. Mar 27, 2017 at 13:59

2 Answers 2

1

System-wide timezone setting is controlled by TZ variable in /etc/default/init.

0

I suspect it'd be the same way as changed in Solaris 11, by using nlsadm.

Look for the timezone:

solaris11 [8]# nlsadm list-timezone | grep -i central

Canada/Central

US/Central

I didn't see European central, but there were 62 to pick from if I grep'd for Europe. Your distro of OpenIndiana would probably give different results.

Set the timezone:

solaris11 [9]# nlsadm set-timezone <TIME_ZONE>

Update per @Baard Kopperud's comment:

Ok, how about looking to see if the timezone service is in SMF. As I think nlsadm is a tool to allow the SAs to easily move over from flatfile configs to things being more defined in SMF with v11.

[] # svccfg -s svc:/system/timezone:default listprop |grep localtime timezone/localtime astring US/Eastern sysconfig/config_properties astring sc_timezone:timezone/localtime`

[] # svccfg -s timezone:default svc:/system/timezone:default> setprop timezone/localtime = <NEW_TIMEZONE_LOCALE> svc:/system/timezone:default> end [] # svcadm refresh timezone

2
  • Yeah, that's pretty much the other post I found suggested... Unfortunately, there is no nlsadm command on my system (only one called nlsadmin - which appears to do something completely different). The other post suggested that the package with the nlsadm-command could be installed... I tried, but it appear there is no such package on OpenIndian Hipster. Hence, I'm trying to find some config-file to edit manually... Mar 27, 2017 at 20:23
  • I added an update in regards to your comment. Not what you're wanting, but you could always specify the TZ in the various shell files (.cshrc, .profile). Mar 27, 2017 at 21:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .