Crontab Timezone

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

When I login via SSH at the moment and use the "date" command I get the date and time returned in PST.
When I setup jobs with "crontab -e" that date is also interpreted as PST.

Is there a way that I can have the dates used in crontab interpreted as EST without affecting the rest of the users on the server ?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

My 2 cents is never set up a machine that acts as a server in anything but UTC time. The time constant is just that, and if you have users that are around the world (some of which do not adhere to the concept of daylight savings, which shifts actual time) you will have a constant by which to accomplish maintenance and problem determination.

So when you make things like crontabs, you set them up at utc time, so yes you have to do a little math in your head. :)
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Posts: 3318
  • Loc: Trout Creek, MT

Post 3+ Months Ago

Thats what I was thinking too. But not all people think logically like us, there are some morons out there who will say "I'm an American! I use American time!" and then it all gets screwed up.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

It really doesn't make a difference whether it's PST or UTC, I'd still have to do the math. I don't want to do the math, that's what the computer is for. I'm tired of doing math, I was doing college level math in 9th grade, I want to use that brain power to think about strippers and beer now that I'm pushing 30. :D

It would be nice if there were something I could add to the top of my crontab, similar to MAILTO, that would tell the server which timesize the schedules should be interpreted as. :D
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

I am really not sure how user's are 'impacted' by a server employing CUT time. It really makes the most sense, especially when you have disparate systems in different geographies.

The SYSTEM should use SYSTEM time; it's not *your* time, it's system time. Applications can make use of timezone references and engage the use of 'timezone math' for you. (EST is CUT -5, with automated interpolation for daylight savings checked on or off -- depending on if you use it).

All the more reason, if you have users in various time zones, to use a standardized system time.

How many crontab entires are you making really? New ones every day? Once you make them, they usually don't need to be made again, as the implication of cron is a repetitive job to be performed. :)
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

I'm not making them very often, meaning I forget about the timezone offset, which is why it would be nice to have something that does the math for me so I don't have to remember something I don't use very often.

I keep setting up jobs, and then kicking myself when it happens at a different time than I thought it was for the first run. :D

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 81 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.