BryanWilhite / SonghayCore

core reusable, opinionated concerns for *all* 🧐 of my C# projects
http://songhayblog.azurewebsites.net/
MIT License
1 stars 0 forks source link

The name `ConvertDateTimeToUtc` confuses date formats and time zones #160

Closed BryanWilhite closed 7 months ago

BryanWilhite commented 10 months ago

https://github.com/BryanWilhite/SonghayCore/blob/c9923e7371f17334707699ea6f292c5ed6311862/SonghayCore/ProgramTypeUtility._.cs#L82

UTC refers to a time zone; the ToString string template in ConvertDateTimeToUtc comes from the ISO 8601 format

🔗 https://en.wikipedia.org/wiki/ISO_8601

BryanWilhite commented 7 months ago

ConvertDateTimeToUtc is just a non-helpful wrapper around ToUniversalTime which should not be 'hidden' from readers of the code