In sched/wiki2: if job has no time limit specified, return the partition's
   time limit (which is the default for the job) rather than 365 days.

diff --git a/NEWS b/NEWS
index 4fe3352..e67beb6 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,8 @@
    that will never end.
  - Added fork handlers in the slurmstepd
  - In sched/wiki2: fix logic for restarting backup slurmctld.
+ - In sched/wiki2: if job has no time limit specified, return the partition's 
+   time limit (which is the default for the job) rather than 365 days.
 
 * Changes in SLURM 1.1.36
 =========================
diff --git a/src/plugins/sched/wiki2/get_jobs.c b/src/plugins/sched/wiki2/get_jobs.c
index 922c1a4..79fb47e 100644
--- a/src/plugins/sched/wiki2/get_jobs.c
+++ b/src/plugins/sched/wiki2/get_jobs.c
@@ -420,6 +420,13 @@
 {
 	uint32_t limit = job_ptr->time_limit;
 
+	if ((limit == NO_VAL) && (job_ptr->part_ptr)) {
+		/* Job will get partition's time limit when schedule.
+		 * The partition's limit can change between now and 
+		 * job initiation time. */
+		limit = job_ptr->part_ptr->max_time;
+	}
+
 	if ((limit == NO_VAL) || (limit == INFINITE))
 		return (uint32_t) (365 * 24 * 60 * 60);	/* one year */
 	else