Windows PowerShell Home
Convertto-html doesn't use regional settings for get-date
5/15/2013 2:31:15 PM
User(s) can reproduce this bug
When testing the scripts for event 3 i noticed that the date being given was not correctly interpreted. It will take the date to be in the US format instead of the systems regional setting. Code to reproduce the error is below.
How often does this happen?
Have you seen this problem before in this product?
I do not know if this issue existed previously
ConvertTo-Html -PostContent $(get-date).date #to get a US date
ConvertTo-Csv $(get-date) #to get the correctly formatted date
The HTML output is 05/15/2013 00:00:00
The CSV output for the date is 15/05/2013 00:00:00
In this test the CSV has formatted the date in the expected dd/mm/yyyy format.
to post a comment.
Please enter a comment.
to post a workaround.
Please enter a workaround.
© 2014 Microsoft