i sent this to the slurm-users mailing list and then remembered i had support and should have probably opened it here instead... --- when i run 'scontrol -o -d show job jobid=' i get a long list of variables some of those variables are spit out as dates. since the dates do not include a timezone field how should that date field be assumed to work? from the value i conclude that it's my localtime, but is the date being stored as UTC and converted using the TIMEZONE env parameter, or are the dates being stored in my current timezone. My cursory scan of the manpages don't reveal anything related to timezone and date/time's in slurm. i'm just curious how it works.
Times are stored internally as time_t - the number of seconds since the Epoch (Jan 1 1970 00:00:00 UTC). Slurm converts this time to local time using the function localtime_r(). If you're curious how it works exactly, check the Slurm function slurm_make_time_str in src/common/parse_time.c.
Ok, thanks. Can you comment on what level of effort would be required to have the dates come out with a timezone or reporting all the dates as epoch time instead?
It's already implemented - use the SLURM_TIME_FORMAT environment variable. From the scontrol man page: "A valid strftime() format can also be specified." %s gives seconds since the Epoch; %Z gives the timezone name or abbreviation. http://man7.org/linux/man-pages/man3/strftime.3.html $ SLURM_TIME_FORMAT=%s scontrol show job | grep -i time RunTime=00:00:00 TimeLimit=UNLIMITED TimeMin=N/A SubmitTime=1519663197 EligibleTime=1519663197 StartTime=1519663197 EndTime=1519663197 Deadline=N/A PreemptTime=None SuspendTime=None SecsPreSuspend=0 $ SLURM_TIME_FORMAT=%T%Z scontrol show job | grep -i time RunTime=00:00:00 TimeLimit=UNLIMITED TimeMin=N/A SubmitTime=09:39:57MST EligibleTime=09:39:57MST StartTime=09:39:57MST EndTime=09:39:57MST Deadline=N/A PreemptTime=None SuspendTime=None SecsPreSuspend=0
Thanks, works great.