tcox8 / OSD-Reporting

This script creates a webpage to show SCCM OSD Reporting
16 stars 5 forks source link

Report timestamps #11

Closed Mugbaz closed 2 years ago

Mugbaz commented 3 years ago

Method of changing report timestamps from month/day/year format to day.month.year (or other) without the need of altering the ps1 file.

tcox8 commented 3 years ago

Planned fix in ver. 2.6.

tcox8 commented 3 years ago

@Mugbaz Can you please try the code in Version 2.6? I am able to test to a limit using powershell and set-culture but it isn't a perfect test. My limited testing seemed successful.

Link to Code: LINK

tcox8 commented 3 years ago

@Mugbaz Note: There are no added parameters. The script should detect location.

Mugbaz commented 3 years ago

The date punctuation changed correctly from slashes to dots, but it's still showing in the wrong order (month.day.year) for my region. My region uses day.month.year

tcox8 commented 3 years ago

@Mugbaz Can you confirm what region are you in? Can you please povide the results of "Get-Culture" in powershell? Thanks!

Mugbaz commented 3 years ago
PS> Get-Culture
LCID             Name             DisplayName
----             ----             -----------
1035             fi-FI            Finnish (Finland)

PS> (Get-Culture).DateTimeFormat.ShortDatePattern
d.M.yyyy
tcox8 commented 3 years ago

@Mugbaz Please test the Ver2.6 code again. I made changes in the code around lines 483-501. Testing for me showed it was successful. Please report back on your findings. Thanks!

Link: Ver2.6

Mugbaz commented 3 years ago

I'm getting a lot of "String was not recognized as a valid DateTime." errors from rows 485, 486, 492, 493, 498 and 499 now. Would this be of any help? PowerShell [DateTime] throws the error "String was not recognized as a valid DateTime."

tcox8 commented 3 years ago

@Mugbaz Sorry for such a long delay, I've been swamped at work. Please test the Ver2.6.1 code. I updated the code to match the URL you provided (thanks for that!). Please report back on your findings. Thanks!

Link: Ver2.6.1