< Back

Convert-UtcToLocal

Sat Jan 18, 2020 9:47 am

NAME Convert-UtcToLocal



SYNOPSIS

Converts UTC time to the system local time.





SYNTAX

Convert-UtcToLocal [[-Time] <DateTime>] [[-TimeZone] <String>] [[-AddDays] <Int32>] [[-AddHours] <Int32>]

[[-AddMinutes] <Int32>] [<CommonParameters>]





DESCRIPTION

Converts the current UTC time to the local system time, using the local system's timezone.

To override the UTC Time, enter an ISO 8601 string (ex: "2017-08-01 09:20:00") as a parameter.

To override the Time Zone use any of the time zone strings listed in

https://msdn.microsoft.com/en-us/library/cc749073.aspx





PARAMETERS

-Time <DateTime>



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-TimeZone <String>



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AddDays <Int32>



Required? false

Position? 3

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-AddHours <Int32>



Required? false

Position? 4

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-AddMinutes <Int32>



Required? false

Position? 5

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Convert-UtcToLocal -AddHours -3 -UtcTime "2017-08-01 03:00:00"













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Convert-UtcToLocal -TimeZone "Pacific Standard Time"















RELATED LINKS