Closed mweerden closed 4 years ago
The following code from FrameUtils.fs (lines 314-316) is where the problem is:
formatter (fun (dt:System.DateTimeOffset) -> if dt.TimeOfDay = TimeSpan.Zero then dt.Date.ToString("d", ci) else dt.DateTime.ToString(ci)) ] |> dict
Here dt.DateTime does not have the offset information, which will result in ToString just assuming the local time zone when required.
dt.DateTime
ToString
The other case is also not right, as the output will normally not include the offset with "d".
"d"
It's probably best to just use formatter (fun (dt:System.DateTimeOffset) -> dt.ToString(ci)) instead. (Personally, I would do the same for DateTime.)
formatter (fun (dt:System.DateTimeOffset) -> dt.ToString(ci))
DateTime
The following code from FrameUtils.fs (lines 314-316) is where the problem is:
Here
dt.DateTime
does not have the offset information, which will result inToString
just assuming the local time zone when required.The other case is also not right, as the output will normally not include the offset with
"d"
.It's probably best to just use
formatter (fun (dt:System.DateTimeOffset) -> dt.ToString(ci))
instead. (Personally, I would do the same forDateTime
.)