RtcTime.md 5.9 KB
Newer Older
W
wenjun 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
# RtcTime<a name="ZH-CN_TOPIC_0000001054598197"></a>

## **Overview**<a name="section648468672093536"></a>

**Related Modules:**

[RTC](RTC.md)

**Description:**

Defines the RTC information. 

The RTC information includes the year, month, day, day of the week, hour, minute, second, and millisecond. The start time is 1970/01/01 Thursday 00:00:00 \(UTC\). 

## **Summary**<a name="section385937578093536"></a>

## Data Fields<a name="pub-attribs"></a>

<a name="table283251222093536"></a>
<table><thead align="left"><tr id="row1102125926093536"><th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.1"><p id="p88724007093536"><a name="p88724007093536"></a><a name="p88724007093536"></a>Variable Name</p>
</th>
<th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.2"><p id="p789796536093536"><a name="p789796536093536"></a><a name="p789796536093536"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row930372367093536"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1695328461093536"><a name="p1695328461093536"></a><a name="p1695328461093536"></a><a href="RtcTime.md#a8d7d49086d28faf2f700c45aab23c58b">second</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1275581184093536"><a name="p1275581184093536"></a><a name="p1275581184093536"></a>uint8_t&nbsp;</p>
</td>
</tr>
<tr id="row360634438093536"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1107077548093536"><a name="p1107077548093536"></a><a name="p1107077548093536"></a><a href="RtcTime.md#a990d7d066bc918d0b2f19162deb1845f">minute</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1863598576093536"><a name="p1863598576093536"></a><a name="p1863598576093536"></a>uint8_t&nbsp;</p>
</td>
</tr>
<tr id="row1986226419093536"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p2045879543093536"><a name="p2045879543093536"></a><a name="p2045879543093536"></a><a href="RtcTime.md#a0dc9482d29a4b61184b281b766b0ff89">hour</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1190877663093536"><a name="p1190877663093536"></a><a name="p1190877663093536"></a>uint8_t&nbsp;</p>
</td>
</tr>
<tr id="row1709297315093536"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p130308638093536"><a name="p130308638093536"></a><a name="p130308638093536"></a><a href="RtcTime.md#aad7e09d86beed6186b75ce2f1361f20b">day</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p943485870093536"><a name="p943485870093536"></a><a name="p943485870093536"></a>uint8_t&nbsp;</p>
</td>
</tr>
<tr id="row700642306093536"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p20166259093536"><a name="p20166259093536"></a><a name="p20166259093536"></a><a href="RtcTime.md#aae45834a39c6b4a03dc85da72298b37e">weekday</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p524348140093536"><a name="p524348140093536"></a><a name="p524348140093536"></a>uint8_t&nbsp;</p>
</td>
</tr>
<tr id="row1163804508093536"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1011503303093536"><a name="p1011503303093536"></a><a name="p1011503303093536"></a><a href="RtcTime.md#a527b18b3a0b709966d04106f0a5aed78">month</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p581297311093536"><a name="p581297311093536"></a><a name="p581297311093536"></a>uint8_t&nbsp;</p>
</td>
</tr>
<tr id="row363640919093536"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1855727738093536"><a name="p1855727738093536"></a><a name="p1855727738093536"></a><a href="RtcTime.md#a7781f6e9f083f7f24aa359651eadd19b">year</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p887736961093536"><a name="p887736961093536"></a><a name="p887736961093536"></a>uint16_t&nbsp;</p>
</td>
</tr>
<tr id="row934009010093536"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p963811676093536"><a name="p963811676093536"></a><a name="p963811676093536"></a><a href="RtcTime.md#afbfa636802d9e4e3b8502d4619ed771f">millisecond</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p354543729093536"><a name="p354543729093536"></a><a name="p354543729093536"></a>uint16_t&nbsp;</p>
</td>
</tr>
</tbody>
</table>

## **Details**<a name="section1174147737093536"></a>

## **Field Documentation**<a name="section11763547093536"></a>

## day<a name="aad7e09d86beed6186b75ce2f1361f20b"></a>

```
uint8_t RtcTime::day
```

 **Description:**

Day. The value ranges from 1 to 31. 

## hour<a name="a0dc9482d29a4b61184b281b766b0ff89"></a>

```
uint8_t RtcTime::hour
```

 **Description:**

Hour. The value ranges from 0 to 23. 

## millisecond<a name="afbfa636802d9e4e3b8502d4619ed771f"></a>

```
uint16_t RtcTime::millisecond
```

 **Description:**

Millisecond. The value ranges from 0 to 990, with a precision of 10 milliseconds. 

## minute<a name="a990d7d066bc918d0b2f19162deb1845f"></a>

```
uint8_t RtcTime::minute
```

 **Description:**

Minute. The value ranges from 0 to 59. 

## month<a name="a527b18b3a0b709966d04106f0a5aed78"></a>

```
uint8_t RtcTime::month
```

 **Description:**

Month. The value ranges from 1 to 12. 

## second<a name="a8d7d49086d28faf2f700c45aab23c58b"></a>

```
uint8_t RtcTime::second
```

 **Description:**

Second. The value ranges from 0 to 59. 

## weekday<a name="aae45834a39c6b4a03dc85da72298b37e"></a>

```
uint8_t RtcTime::weekday
```

 **Description:**

Day of the week. The value ranges from 1 to 7, representing Monday to Sunday. 

## year<a name="a7781f6e9f083f7f24aa359651eadd19b"></a>

```
uint16_t RtcTime::year
```

 **Description:**

Year. The value is greater than or equal to 1970.