Source

stacky / trunk / source / Stacky.Net35 / StackyClient / QuestionMethods.cs

Diff from to

File trunk/source/Stacky.Net35/StackyClient/QuestionMethods.cs

                 body = includeBody ? (bool?)true : null,
                 comments = includeComments ? (bool?)true : null,
                 answers = includeAnswers ? (bool?)true : null,
-                fromdate = fromDate.HasValue ? (long?)fromDate.Value.ToUnixTime() : null,
-                todate = toDate.HasValue ? (long?)toDate.Value.ToUnixTime() : null,
+                fromdate = GetDateValue(fromDate),
+                todate = GetDateValue(toDate),
                 tagged = tags == null ? (string)null : String.Join(" ", tags),
                 sort = sort,
                 order = sortDirection,
                 site = this.SiteUrlName,
                 page = options.Page ?? null,
                 pagesize = options.PageSize ?? null,
-                fromdate = options.FromDate.HasValue ? (long?)options.FromDate.Value.ToUnixTime() : null,
-                todate = options.ToDate.HasValue ? (long?)options.ToDate.Value.ToUnixTime() : null
+                fromdate = GetDateValue(options.FromDate),
+                todate = GetDateValue(options.ToDate),
             });
             return new PagedList<PostEvent>(response);
         }