> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IXtfConsoleControlClient::GetSystemTime

> IXtfConsoleControlClient::GetSystemTime

# IXtfConsoleControlClient::GetSystemTime

從目前的開發主機擷取系統時間。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT GetSystemTime(
         XTFSYSTEMTIME *pSystemTime
)  
```

<a id="parametersSection" />

### 參數

*pSystemTime*\
類型：XTFSYSTEMTIME\*

指向 [XTFSYSTEMTIME](/zh-TW/reference/tools/xtf/xtfconsolecontrol/structs/xtfsystemtime) 結構的指標，用來接收目前開發主機的系統時間。

<a id="retvalSection" />

### 傳回值

類型：HRESULT

如果成功，則傳回 `S_OK`；否則傳回 HRESULT 錯誤碼。

<a id="remarksSection" />

## 備註

此函式會以 [XTFSYSTEMTIME](/zh-TW/reference/tools/xtf/xtfconsolecontrol/structs/xtfsystemtime) 結構的形式，從目前的開發主機擷取系統日期和時間。此結構會以年到毫秒的各個組成部分來表示系統日期和時間。如需在開發主機上檢視目前系統時間的詳細資訊，請參閱[主機上的開發人員首頁 (Dev Home) (NDA 主題)](/zh-TW/tools/tools-console/devhome/devhome)。

<a id="requirementsSection" />

## 需求

**標頭：** xtfconsolecontrol.h

**程式庫：** xtfconsolecontrol.lib

**支援的平台：** Windows (適用於 XBOX 主機工具)

<a id="seealsoSection" />

## 另請參閱

[XTFSYSTEMTIME](/zh-TW/reference/tools/xtf/xtfconsolecontrol/structs/xtfsystemtime)\
[IXtfConsoleControlClient](/zh-TW/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient)\
[XtfConsoleControl](/zh-TW/reference/tools/xtf/xtfconsolecontrol/xtfconsolecontrol_members)


## Related topics

- [XTFSYSTEMTIME](/zh-TW/reference/tools/xtf/xtfconsolecontrol/structs/xtfsystemtime.md)
- [IXtfConsoleControlClient](/zh-TW/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient.md)
- [IXtfConsoleControlClient::GetAllSettings](/zh-TW/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getallsettings.md)
- [IXtfConsoleControlClient::GetConfigSettings](/zh-TW/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getconfigsettings.md)
- [IXtfConsoleControlClient::GetConfigValue](/zh-TW/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getconfigvalue.md)
