Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions reference/5.1/Microsoft.PowerShell.Utility/Get-Date.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 04/30/2025
ms.date: 06/30/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/get-date?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Get-Date
Expand Down Expand Up @@ -556,13 +556,17 @@ The valid **UFormat specifiers** are displayed in the following table:
| `%Z` | Time zone offset from Universal Time Coordinate (UTC) | -07 |

> [!NOTE]
> Windows PowerShell's behavior with `Get-Date -UFormat %s` is incorrect in two respects:
> In Windows PowerShell, not all **UFormat** specifiers produce the same results as their Unix
> equivalents. For example:
>
> - The return value is based on local time instead of UTC time.
> - The string representation of the seconds value has a fractional part. The output is
> culture-sensitive with respect to the decimal mark.
> - `Get-Date -UFormat %s` is incorrect in two respects:
> - The return value is based on local time instead of UTC time.
> - The string representation of the seconds value has a fractional part. The output is
> culture-sensitive with respect to the decimal mark.
> - The formats of `%c`, `%l`, `%k`, `%s`, `%j`, and `%V` aren't consistent with the ISO 8601
> standard.
>
> These behaviors have been fixed in PowerShell 6 and higher.
> These behaviors are fixed in PowerShell 6.1 and higher.

## RELATED LINKS

Expand Down
11 changes: 7 additions & 4 deletions reference/7.4/Microsoft.PowerShell.Utility/Get-Date.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 04/30/2025
ms.date: 06/30/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Get-Date
Expand Down Expand Up @@ -657,10 +657,13 @@ The valid **UFormat specifiers** are displayed in the following table:
| `%Z` | Time zone offset from Universal Time Coordinate (UTC) | -07 |

> [!NOTE]
> The behavior of `-UFormat %s` was changed to fix problems with the behavior in Windows PowerShell.
> Not all **UFormat** specifiers produce the same results as their Unix equivalents. For example:
>
> - The return value is based on UTC time.
> - The value is a whole number of seconds value (no fractional part).
> - In Unix-based systems, `%W` returns the week number of the year as a decimal number in the range
> 00 to 53, starting with the first Monday as the first day of week 01. All days before the first
> Monday of the year are in week 00.
> - In PowerShell, `%W` returns the week number of the year as a decimal number, range 1 to 53, with
> no leading zero and no week zero. The first week starts on the first day of the year.

## RELATED LINKS

Expand Down
11 changes: 7 additions & 4 deletions reference/7.5/Microsoft.PowerShell.Utility/Get-Date.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 04/30/2025
ms.date: 06/30/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Get-Date
Expand Down Expand Up @@ -657,10 +657,13 @@ The valid **UFormat specifiers** are displayed in the following table:
| `%Z` | Time zone offset from Universal Time Coordinate (UTC) | -07 |

> [!NOTE]
> The behavior of `-UFormat %s` was changed to fix problems with the behavior in Windows PowerShell.
> Not all **UFormat** specifiers produce the same results as their Unix equivalents. For example:
>
> - The return value is based on UTC time.
> - The value is a whole number of seconds value (no fractional part).
> - In Unix-based systems, `%W` returns the week number of the year as a decimal number in the range
> 00 to 53, starting with the first Monday as the first day of week 01. All days before the first
> Monday of the year are in week 00.
> - In PowerShell, `%W` returns the week number of the year as a decimal number, range 1 to 53, with
> no leading zero and no week zero. The first week starts on the first day of the year.

## RELATED LINKS

Expand Down
11 changes: 7 additions & 4 deletions reference/7.6/Microsoft.PowerShell.Utility/Get-Date.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 03/19/2024
ms.date: 06/30/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7.6&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Get-Date
Expand Down Expand Up @@ -657,10 +657,13 @@ The valid **UFormat specifiers** are displayed in the following table:
| `%Z` | Time zone offset from Universal Time Coordinate (UTC) | -07 |

> [!NOTE]
> The behavior of `-UFormat %s` was changed to fix problems with the behavior in Windows PowerShell.
> Not all **UFormat** specifiers produce the same results as their Unix equivalents. For example:
>
> - The return value is based on UTC time.
> - The value is a whole number of seconds value (no fractional part).
> - In Unix-based systems, `%W` returns the week number of the year as a decimal number in the range
> 00 to 53, starting with the first Monday as the first day of week 01. All days before the first
> Monday of the year are in week 00.
> - In PowerShell, `%W` returns the week number of the year as a decimal number, range 1 to 53, with
> no leading zero and no week zero. The first week starts on the first day of the year.

## RELATED LINKS

Expand Down
11 changes: 7 additions & 4 deletions reference/7.7/Microsoft.PowerShell.Utility/Get-Date.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 03/19/2024
ms.date: 06/30/2026
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7.7&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Get-Date
Expand Down Expand Up @@ -657,10 +657,13 @@ The valid **UFormat specifiers** are displayed in the following table:
| `%Z` | Time zone offset from Universal Time Coordinate (UTC) | -07 |

> [!NOTE]
> The behavior of `-UFormat %s` was changed to fix problems with the behavior in Windows PowerShell.
> Not all **UFormat** specifiers produce the same results as their Unix equivalents. For example:
>
> - The return value is based on UTC time.
> - The value is a whole number of seconds value (no fractional part).
> - In Unix-based systems, `%W` returns the week number of the year as a decimal number in the range
> 00 to 53, starting with the first Monday as the first day of week 01. All days before the first
> Monday of the year are in week 00.
> - In PowerShell, `%W` returns the week number of the year as a decimal number, range 1 to 53, with
> no leading zero and no week zero. The first week starts on the first day of the year.

## RELATED LINKS

Expand Down