Commit ea7c688
committed
IOTSDK-24021: Fix parsing of server DateTime
std::get_time does not claim support of time zones in the string
parameter, and seems to be subject of locale set on the system. An
example is a following result on linux:
ParseTime(Thu, 1 Jan 1970 0:00:00 GMT)=-2209075200
::strptime is also a subject to the time zones of locale, but it also
claim support for parsing a time zone from the passed string. Thus,
additional logic incorporated to offset parsed DataTime to the local
timezone.
Signed-off-by: Mykhailo Diachenko <ext-mykhailo.z.diachenko@here.com>1 parent 6d25648 commit ea7c688
File tree
1 file changed
+19
-2
lines changed- olp-cpp-sdk-authentication/src
1 file changed
+19
-2
lines changedLines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
101 | | - | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
108 | 125 | | |
109 | 126 | | |
110 | 127 | | |
| |||
0 commit comments