Skip to content

Commit

Permalink
Merge pull request #41 from dynamicweb/dbe/20755-Issues-converting-da…
Browse files Browse the repository at this point in the history
…teTimeString

Issues converting dateTimeString
  • Loading branch information
DWDBE authored Aug 16, 2024
2 parents 021f259 + 9ec0173 commit 677e5a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>10.6.1</Version>
<Version>10.6.2</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<Title>OData Provider</Title>
<Description>The Odata Provider lets you fetch and map data from or to any OData endpoint.</Description>
Expand Down
2 changes: 1 addition & 1 deletion src/ODataSourceReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ private string GetModeAsParameters()

if (!string.IsNullOrWhiteSpace(dateTimeFilterName))
{
var theDateTime = ODataWriter.GetTheDateTimeInZeroTimeZone(lastRunDateTime.Value.ToString(CultureInfo.InvariantCulture), isEdmDate);
var theDateTime = ODataWriter.GetTheDateTimeInZeroTimeZone(lastRunDateTime.Value, isEdmDate);
if (isEdmDate)
{
dateTimeFilterName += " ge " + theDateTime;
Expand Down
2 changes: 1 addition & 1 deletion src/ODataWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ internal string MapValuesToJSon(Dictionary<string, object> row, bool isPatchRequ

public static string GetTheDateTimeInZeroTimeZone(object dateTimeObject, bool isEdmDate)
{
var dateTime = Converter.ToDateTime(dateTimeObject);
DateTime dateTime = (dateTimeObject is not null && dateTimeObject is DateTime) ? (DateTime)dateTimeObject : Converter.ToDateTime(dateTimeObject);
DateTime dateTimeInUtc;
if (SqlDateTime.MinValue.Value == dateTime || DateTime.MinValue == dateTime)
{
Expand Down

0 comments on commit 677e5a2

Please sign in to comment.