MLSD Last Modified DateTime.Kind
Closed this issue · 2 comments
cedmundsNull commented
When getting a listing with MLSD, the last modified DateTime.Kind is Unspecified.
Should it be updated to UTC?
As far as I understand, MLSD should always return UTC times.
Currently, I have implemented the following workaround:
var listing = await client.GetListing(path);
if (client.Config.ListingParser == FluentFTP.FtpParser.Machine)
foreach (var item in listing)
item.Modified = DateTime.SpecifyKind(item.Modified, DateTimeKind.Utc);
FanDjango commented
Good catch, I agree.
And thanks for the code. But why not PR yourself and grab the kudos?
FanDjango commented
There is a nice PR now addressing this issue, so as suggested by @cedmundsNull in #1509: closing