What timezone does crond run in?

I got cron running on my Drobo-FS but noticed that the times that it ran were wrong. It looks like they are running in a different timezone (Pacific?)

If I just update /etc/profile with export TZ=EST5EDT and reboot the drobo, will the jobs now run in in that timezone? Or do I need to copy in a /etc/localtime file (which currently does not exist).

I believe it defaults to UTC?
Run date in the shell and see what time it reports.

Just checked “date” my Drobo 5N, and it reports Pacific Standard Time (PST). This is not my local time, and I have an app that runs on a schedule. Can the timezone be changed?

That question is better left for a DroboApp expert like Ricardo. :slight_smile:

Did someone summon me? :slight_smile:

Here’s the long explanation: the Drobo FS and 5N are GLIBC-based devices. GLIBC is the library responsible for all timezone related functionality. In GLIBC systems, the timezone is specified through the TZ environment variable, and the default value comes from /etc/localtime. More information here: http://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html

In other words: if you want a specific timezone, set the TZ environment variable. If TZ is undefined, then GLIBC will use whatever is in /etc/localtime.

The Drobo FS does not have an /etc/localtime. It exports the default timezone in the file /etc/init.d/rcS like this: “export TZ=‘PST +8PDT,M4.1.0/2,M10.5.0/2’”

The Drobo 5N does have an /etc/localtime. It exports the default timezone as “PST8PDT,M3.2.0,M11.1.0”.

With that being said, I strongly advise against messing with either /etc/init.d/rcS or /etc/localtime. Neither Drobo ships with the required binaries to change the timezone correctly (missing tzselect, timezone data, …).

The recommended way of dealing with this on Drobos is to explicitly set TZ whenever you need it, i.e., in the app’s service.sh script. It is not an ideal solution since you’ll need to set it in each app separately, but unfortunately this is the only reasonable choice until there’s a DroboApp with all the missing bits and pieces required to properly update the default timezone.

Thanx ricardo. :slight_smile:

Wow. Most expensive NAS in its class and I can’t even set the timezone reliably.

However, since I’ve wasted a good portion of my life getting Drobo Apps installed and running (since the promise of easy installs made on the website is yet another lie) I suppose I’ll have to persevere.

My timezone is GMT+2. How TAF do I set this on my 5N? Setting a variable for each app seems insane and I don’t have the know-how to do that. If I did go the /etc/localtime route, what would I do to get it to UTC+2 (I have Googled this hard and found nothing)?

Man. I really want to love this thing. But seriously?

Appreciate community support. Thank god Drobo has amazing customers, which seems to be the only thing going for them.

Depends on what you mean by reliably. I can set the TZ perfectly fine, and it behaves exactly as expected.

And yet setting the TZ variable is the simplest way. Like I said before, /etc/localtime is a binary file that contains the default timezone information. You can replace that file, but that requires the full tzdata package, which is just too big to be shipped in the tiny Drobo flash memory. You can try to get a hold of a Linux machine, then look under /usr/share/zoneinfo/ to find the file that you need. Then make a backup copy of /etc/localtime on the Drobo, and copy the timezone information you want from the Linux machine as /etc/localtime on the Drobo. Mind you, this is absolutely untested, and could very likely brick your Drobo. My guts tell me it should work, but the alternative is so much less painful in case of a mistake that I can’t be bothered to try.

What is it that you are trying to achieve anyway? If it is just one app, you could simply add one line to service.sh like this:

export TZ="UTC+2"

In fact, if you are feeling brave you could add that line to /etc/init.d/rcS before nasd is called, and it would override for all apps. The only downside (which is the same as localtime) is that when you upgrade the firmware these changes will be undone.

Thanks Ricardo :slight_smile: Really appreciate the detailed reply. You rock.

My 5N doesn’t have a /etc/localtime file but I will go the TZ route for now.

My annoyance is just that this seems like something any other NAS does with ease. Part of the reason I bought a Drobo is because it’s advertised as being simple to use and reliable. On the website they make it look like DroboApps are one-click installs from an app store and that “just work”. Even the Drobo Dashboard (don’t get me started on that) lets you install apps easily but says nothing about the hacking required to get any of them to work. Why even list them officially if there is no condition under which they’ll run?

If Drobo had said “Hey guys, we’re working on bringing apps to our devices and it’s going to suck at first while we figure this out but we need the help of the community, etc.” I would’ve shopped elsewhere, but respected them for the honesty. Instead, they dishonestly list products like Crashplan and Plex on their website as things you can easily install on a Drobo.

I’ve spent years using Linux. I’m not an expert, but I’m comfortable enough to install OpenSSH, etc. - however, that’s not the point. I bought a product that was advertised as premium with a robust app store approach to extensibility. And it’s a blatant lie.

And then I can’t even set the timezone without editing scripts? On a system that should robustly handle backup schedules? Gimme a break.

EDIT: I forgot to mention that my objective here is to get SABNZBD to download on a schedule. I have added the TZ line to the end of service.sh but there is no way to see what time is being reported by the app so I’ll have to set up a schedule and test.

If I wanted to achieve this for EST (UTC -4) would my rcS file look like this? I’ve only copied the last two sections of the file.

[code]# if the DroboShare Name file doesn’t exist then

write out a default one

if [ ! -f /var/samba/netbios.conf ]; then
/bin/set_droboshare_name.sh DroboShare

export TZ=“UTC-4”

/usr/bin/nasdLogRotate &
/usr/bin/nasd 1>> /var/log/nasd.log 2>&1 &
/bin/sh /bin/LXcpuHistory.sh 1 &[/code]

It is truly amazing that Drobo still does not support updating the timezone to this date. I just got off the phone with support and they would not even discuss the matter. The just stuck to their guns and said that they do not support this functionality.