| Summary: | no timezone in dates? | ||
|---|---|---|---|
| Product: | Slurm | Reporter: | Michael DiDomenico <mdidomenico> |
| Component: | User Commands | Assignee: | Marshall Garey <marshall> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | 4 - Minor Issue | ||
| Priority: | --- | ||
| Version: | 17.02.7 | ||
| Hardware: | Linux | ||
| OS: | Linux | ||
| Site: | IDACCR | Slinky Site: | --- |
| Alineos Sites: | --- | Atos/Eviden Sites: | --- |
| Confidential Site: | --- | Coreweave sites: | --- |
| Cray Sites: | --- | DS9 clusters: | --- |
| Google sites: | --- | HPCnow Sites: | --- |
| HPE Sites: | --- | IBM Sites: | --- |
| NOAA SIte: | --- | NoveTech Sites: | --- |
| Nvidia HWinf-CS Sites: | --- | OCF Sites: | --- |
| Recursion Pharma Sites: | --- | SFW Sites: | --- |
| SNIC sites: | --- | Tzag Elita Sites: | --- |
| Linux Distro: | --- | Machine Name: | |
| CLE Version: | Version Fixed: | ||
| Target Release: | --- | DevPrio: | --- |
| Emory-Cloud Sites: | --- | ||
|
Description
Michael DiDomenico
2018-02-23 12:10:34 MST
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. |