Skip to content

Commit c5dae52

Browse files
Correct the parser function to ParseAsUniversalDateTime
The parser not return the correct Kind type to object.
1 parent 5a3a068 commit c5dae52

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

Class Library/ActiveUp.Net.Common/Parser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ public static DateTime ParseAsUniversalDateTime(string input)
10921092
second = Convert.ToInt32(dateParts[2]);
10931093
int offset_hours = Convert.ToInt32(parts[4].Substring(0, 3));
10941094
int offset_minutes = Convert.ToInt32(parts[4].Substring(3, 2));
1095-
DateTime date = new DateTime(year, month, day, hour, minute, second);
1095+
DateTime date = new DateTime(year, month, day, hour, minute, second, DateTimeKind.Utc);
10961096
date = date.AddHours(-offset_hours);
10971097
date = date.AddMinutes(-offset_minutes);
10981098
return date;

Class Library/ActiveUp.Net.Tests/Common/ParserTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.IO;
4-
using System.Linq;
5-
using System.Text;
63
using ActiveUp.Net.Mail;
74
using NUnit.Framework;
85

0 commit comments

Comments
 (0)