Data ONTAP® PowerShell Toolkit

Switch to clustered Data ONTAP documentation.

Cmdlet: Set-NaTime


NAME
Set-NaTime

SYNOPSIS
Set current date and time to the specified date and time.

SYNTAX
Set-NaTime [-UTC] [-Controller <NaController>] [<CommonParameters>]

Set-NaTime [-Time] <Int32> [-UTC] [-Controller <NaController>] [<CommonParam
eters>]

Set-NaTime [-DateTime] <DateTime> [-UTC] [-Controller <NaController>] [<Comm
onParameters>]


DESCRIPTION
Set current date and time to the specified date and time.


PARAMETERS
-UTC
Specify if time values are presented as universal coordinated time. Oth
erwise, the time should be the local time.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Controller <NaController>
The Data ONTAP controller object, embodied by an NaController object. T
his parameter is returned by the Connect-NaController cmdlet. If not sp
ecified, the value in the global variable CurrentNaController is used.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Time <Int32>
The new time value as a unix time (seconds since 1/1/1970).

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-DateTime <DateTime>
The new time value as a .NET DateTime object.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
DataONTAP.Types.Clock.Time


NOTES


Category: clock
API: clock-set-clock

-------------- Example 1 --------------

C:\PS>Set-NaTime 1269636712


Set the local time on the current controller. In this example, the time is
set but the controller warns that its time is sync'ed to another source.


Set-NaTime : Warning: syncing source which will eventually override the time
se
t by the clock-set-clock api.
At line:1 char:11
+ Set-NaTime <<<< 1269636712
+ CategoryInfo : InvalidOperation: (NetApp.Ontapi.Filer.NaContr
ol
ler:NaController) [Set-NaTime], EVOLUMENOTDECOMPRESSING
+ FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.
Cl
ock.SetNaTime



RELATED LINKS
Get-NaTime







 Data ONTAP® PowerShell Toolkit