@@ -47,12 +47,12 @@ public Job(string accountName, WindowsAzure.Management.Automation.Models.Job job
47
47
this . Id = job . Properties . JobId ;
48
48
this . CreationTime = job . Properties . CreationTime . ToLocalTime ( ) ;
49
49
this . LastModifiedTime = job . Properties . LastModifiedTime . ToLocalTime ( ) ;
50
- this . StartTime = job . Properties . StartTime ;
50
+ this . StartTime = job . Properties . StartTime . HasValue ? job . Properties . StartTime : null ;
51
51
this . Status = job . Properties . Status ;
52
52
this . StatusDetails = job . Properties . StatusDetails ;
53
53
this . RunbookName = job . Properties . Runbook . Name ;
54
54
this . Exception = job . Properties . Exception ;
55
- this . EndTime = job . Properties . EndTime ;
55
+ this . EndTime = job . Properties . EndTime . HasValue ? job . Properties . StartTime : null ;
56
56
this . LastStatusModifiedTime = job . Properties . LastStatusModifiedTime ;
57
57
this . JobParameters = new Hashtable ( StringComparer . InvariantCultureIgnoreCase ) ;
58
58
foreach ( var kvp in job . Properties . Parameters . Where ( kvp => 0 != String . Compare ( kvp . Key , Constants . JobStartedByParameterName , CultureInfo . InvariantCulture ,
@@ -97,12 +97,12 @@ public Job()
97
97
/// <summary>
98
98
/// Gets or sets the start time of the job.
99
99
/// </summary>
100
- public DateTimeOffset StartTime { get ; set ; }
100
+ public DateTimeOffset ? StartTime { get ; set ; }
101
101
102
102
/// <summary>
103
103
/// Gets or sets the end time of the job.
104
104
/// </summary>
105
- public DateTimeOffset EndTime { get ; set ; }
105
+ public DateTimeOffset ? EndTime { get ; set ; }
106
106
107
107
/// <summary>
108
108
/// Gets or sets the exception of the job.
0 commit comments