What's new

root vs user session DST

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Maverickcdn

Senior Member
Question for the gurus regarding DST time and user session run scripts vs cron

Currently in my wicens script it is set to run every 10 mins and it writes to the config file the last cron run date/time using
Code:
date +%c

If running that command in a logged in session the date/time is correct, when the command is run with cron the time is behind by 1hr for DST

Is there a different date command that needs to be used, or should date command run by root (cron) be displaying the correct DST adjusted time?
 
I add the following lines to any scripts that don't already inherit TZ from a parent program.
Code:
  TZ=$(cat /etc/TZ)
  export TZ
 
Thank you sir
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top