I was looking to create a small process that would run nightly on the servertask files (located here [Drive]\Octopus\TaskLogs) that would simply scan the files for certain info my work wanted, but one of the things they want is some timing information (like a deployments time minus a manual pause time) and when I look at the logs the time is in this format:
2018-09-06T19:18:34.6673686+00:100:
Does anyone have a way to take this info and get the correct time because I have not been able to at this point.
The dates in the task logs are in the standard ISO 8601 date format which avoids any confusion about ordering or timezones. The date in your example is 7:18:34 PM on the 6th of September, 2018. However, your example does appear to be formatted incorrectly, as the timezone component (after the +) should read 00:00. I’ve checked my task logs and they have a correct timezone component. Would you mind double checking your task logs and perhaps reply with a small excerpt here so we can make sure they are correct?
You should be able to convert these ISO-format dates to any other format you want with most programming / scripting languages. For example, in C# you can use DateTime.Parse("2018-09-06T19:18:34.6673686+00:00") to read the date and from there do any calculations or formatting which you require.