Jump to content
barrettj

Always showing time in UTC

25 posts in this topic Last Reply

Recommended Posts

I'm in central time, USA.

 

I downloaded the timezone.zip file.  I moved US\Central to my USB key's config folder and renamed it to "timezone" (no extension).  I then set the time zone to (custom) on the settings page and hit apply.  Syncing with NTP is enabled and appears to be working, if that matters.

 

All times displayed (in unmenu, syslog, etc) are still displayed in UTC instead of CST.  Am I doing something wrong?  Thanks!

Share this post


Link to post

Sounds like you did it correctly... might have to reboot for it to take effect.  Not sure when the timezone file is put into place.

 

Joe L.

Share this post


Link to post

I have rebooted and I've also tried using the America/Chicago timezone file instead, neither seemed to make a difference.

 

This was a fresh install of 4.5.  I did notice 4.5.1 was released so I may try to upgrade to that later today.

Share this post


Link to post

Are they zipped?  They have no extension on my windows box.

 

I unzipped the timezone .zip file (http://lime-technology.com/download/doc_download/5-timezone) and there were folders with names like Africa, America, US, etc.  In each of those folders are files that are named after places or timezones, they range from 1 - 3 kb, and have no file extension.  Adding a .zip extension to them, doesn't seem to help as 7zip says they are invalid.  What I did was rename the US/Central file to timezone and then copied it to /flash/config.  If I do a "diff /etc/localtime /boot/config/timezone" the files are identical, but I'm still getting the time displayed in UTC.

Share this post


Link to post

You did it correctly...  Unzip the large file you downloaded, copy the specific timezone file to /boot/config/timezone

Use the management utility to set the time-zone to custom.

 

Then... You may need to reboot for it to take effect.  I see this code in /etc/rc.d/rc.S used when just booting unRAID.

It copies the timezone file from /boot/config to /etc/timezone and uses it.

 

# tmm - Set the configured timezone, must be after flash is mounted on /boot

if [ -r /boot/config/ident.cfg ]; then

  /usr/bin/fromdos </boot/config/ident.cfg >/var/tmp/ident.cfg

  source /var/tmp/ident.cfg

  if [ "$timeZone" = "custom" ]; then

    ln -sf /boot/config/timezone /etc/localtime-copied-from

  else

    ln -sf /usr/share/zoneinfo/Etc/$timeZone /etc/localtime-copied-from

  fi

  cp /etc/localtime-copied-from /etc/localtime

fi

So... if you copied the timezone file into place, and also set "custom" in the settings page, then a reboot is in order.

Stop the array, then press the "Reboot" button.

 

Joe L.

Share this post


Link to post

I've performed many reboots and even updated to 4.5.1, /etc/localtime is the correct file (at least according to diff), but all times are still displayed in UTC.  Setting the timezone to one of the GMT times listed in the settings drop down causes the change to take affect immediately, but switching back to custom still results in displaying UTC.

 

I've additionally tried the US/Eastern timezone file which resulted in the same.  Could anyone with a known good timezone file attach one maybe?  The only thing I can think of is that the files are somehow corrupted as if diff says /etc/localtime and /boot/config/timezone are the same then it's copying everything correctly.

Share this post


Link to post

Did you ever figure this out?

I am seeing the exact same issue on both my towers.

 

Share this post


Link to post

I have not found a solution either, and it is affecting both my towers as well (one was a fresh 4.5 install upgraded to 4.5.1 the other was a fresh 4.5.1).

 

One is an intel, one is an AMD - so no commonality there.

 

I'm assuming it doesn't affect people who were running an earlier version first (and hence a configuration issue?), but I'm new to unraid so I can't really comment.  Here's the contents of some config files:

 

ident.cfg

# Generated settings:

NAME=UNRAID

COMMENT="unRaid File Server"

WORKGROUP=Mshome

localMaster=no

DOMAIN=tascom.phoneserv.com

DOMAIN_LOGIN=Administrator

DOMAIN_PASSWD=

winbindDelay=10

timeZone=custom

USE_NTP=yes

NTP_SERVER1=pool.ntp.org

NTP_SERVER2=

NTP_SERVER3=

 

And I've attached the central timezone file I'm using (maybe someone who has it working can compare it to theirs?), extension changed to .txt to let me upload it to this forum.

 

timezone.txt

Share this post


Link to post

According to the manual it looks like you need to rename the file to "timezone"

 

Time zone

Enter your time zone here.

It is possible to use a custom time zone so that DST adjustments are handled properly. To use this feature, you first need to download your timezone file from our website. Once you have identified your timezone file, right-click the link and select "Save Link As". In the dialog box, type timezone for the File name.

Next, copy the file timezone to the config directory of your Flash. Navigate to the 'Settings' page of the System Management Utility and select "(custom)" in the Time zone dropdown list. Check that the Date and Time are correct and click Apply.

 

 

EDIT: sorry didnt read well enough that the first poster did this.

Share this post


Link to post

According to the manual it looks like you need to rename the file to "timezone"

 

Time zone

Enter your time zone here.

It is possible to use a custom time zone so that DST adjustments are handled properly. To use this feature, you first need to download your timezone file from our website. Once you have identified your timezone file, right-click the link and select "Save Link As". In the dialog box, type timezone for the File name.

Next, copy the file timezone to the config directory of your Flash. Navigate to the 'Settings' page of the System Management Utility and select "(custom)" in the Time zone dropdown list. Check that the Date and Time are correct and click Apply.

 

 

EDIT: sorry didnt read well enough that the first poster did this.

 

I did rename the file.  My current train of thought is that those directions clearly do not jive with how they are distributed now - all of the timezones are in one zip file.  I believe that this zip file contains incorrect versions of the files, but I base this on very little as no one has posted a working timezone file for me to try.  This also goes along with the fact that people that had unraid running prior to the redoing of lime-tech's website don't seem to have this problem.

Share this post


Link to post

Success - that timezone file does indeed work correctly (unlike the eastern timezone file in the .zip on lime-technology.com's download page)!  Now I just need to find a working central timezone file :P

 

 

Attached is a zip file containing both the non-working eastern timezone file and the working one from Joe.  Doing a diff tells me that they're different, but doesn't say how because they're binary files.

easterntimezonefiles.zip

Share this post


Link to post

Success - that timezone file does indeed work correctly (unlike the eastern timezone file in the .zip on lime-technology.com's download page)!  Now I just need to find a working central timezone file :P

 

 

Attached is a zip file containing both the non-working eastern timezone file and the working one from Joe.  Doing a diff tells me that they're different, but doesn't say how because they're binary files.

Send a PM to limetech...  Point him to this post.  I'm sure he will appreciate knowing the files don't work properly.

Share this post


Link to post

It would appear that Arizona does not work either.

 

 

Even better yet - my server won't boot with the Arizona timezone file in place.

 

It stops here:

 

Starting Internet super-server daemon: /user/sbin/inetd
Starting ACPI daemon: /usr/sbin/acpid
Starting Samba: /usr/sbin/nmbd -D

 

Then just a blinking cursor.

 

I have to put the flash drive in another machine to remove the timezone file in orderto boot again.

Share this post


Link to post

It would appear that Arizona does not work either.

 

 

Even better yet - my server won't boot with the Arizona timezone file in place.

 

It stops here:

 

Starting Internet super-server daemon: /user/sbin/inetd
Starting ACPI daemon: /usr/sbin/acpid
Starting Samba: /usr/sbin/nmbd -D

 

Then just a blinking cursor.

 

I have to put the flash drive in another machine to remove the timezone file in orderto boot again.

Others have reported the timezone files on the lime-tech site do not work.  Send lime-tech an e-mail and ask they investigate.

Share this post


Link to post

Success - that timezone file does indeed work correctly (unlike the eastern timezone file in the .zip on lime-technology.com's download page)!  Now I just need to find a working central timezone file :P

 

 

Attached is a zip file containing both the non-working eastern timezone file and the working one from Joe.  Doing a diff tells me that they're different, but doesn't say how because they're binary files.

Send a PM to limetech...  Point him to this post.  I'm sure he will appreciate knowing the files don't work properly.

 

I e-mailed and PMd last week, haven't received a response yet.

Share this post


Link to post

It would appear that Arizona does not work either.

 

If you believe that the Arizona time zone file is corrupted on the Limetech's web site,

then you can get that file directly from the Slackware distribution.

 

Telnet into your server, copy from here, and paste there the following commands:

mkdir /tmp/zoneinfo
cd /tmp/zoneinfo
wget ftp://slackware.osuosl.org/pub/slackware/slackware-current/slackware/a/pkgtools-*.t?z
installpkg pkgtools*
wget ftp://slackware.osuosl.org/pub/slackware/slackware-current/slackware/a/glibc-zoneinfo-*.t?z
explodepkg glibc-zoneinfo*
cp /tmp/zoneinfo/usr/share/zoneinfo/US/Arizona /boot/config/timezone
cd
rm -rf --no-preserve-root /tmp/zoneinfo

 

Purko

 

---

(I could have easier just attached the Arizona file to this post, but I figured

that posting the full instructions may help other people get their files too.)

 

Share this post


Link to post

Don't think unRAID has explodepkg

Hence lines No. 3 and 4 above.

 

---

Edit: spelling.

(Thanks Joe!)

 

Share this post


Link to post

OK, to make your lives even easier, I've uploaded the latest timezone files here:

timezone.zip

md5sum:  8c51aab810c16270c4c4e098ff091a31

 

Share this post


Link to post

Don't think unRAID has explodepkg

Hense lines No. 3 and 4 above.

 

<hiding my head in shame>

I missed that... you are correct, obviously.

</hiding my head in shame>

 

Joe L.

PS. it is "hence" not "hense", so I take some solace you too make some mistakes.  ;D

I'm not ashamed any more. 8)

 

Share this post


Link to post

OK, to make your lives even easier, I've uploaded the latest timezone files here:

timezone.zip

md5sum:  8c51aab810c16270c4c4e098ff091a31

 

 

Thank you.  It's working fine with your timezone file.

Share this post


Link to post

OK, to make your lives even easier, I've uploaded the latest timezone files here:

timezone.zip

md5sum:  8c51aab810c16270c4c4e098ff091a31

 

 

Thank you.  It's working fine with your timezone file.

 

Indeed, thank you - the central timezone file works!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.