kopia lustrzana https://github.com/peterhinch/micropython-samples
DATE.md: Improve section on DST.
rodzic
7088bdb728
commit
cbf63b4479
11
date/DATE.md
11
date/DATE.md
|
@ -87,6 +87,7 @@ This takes a single optional arg:
|
||||||
|
|
||||||
# Example usage
|
# Example usage
|
||||||
|
|
||||||
|
The following code fragments illustrate typical usage:
|
||||||
```python
|
```python
|
||||||
from date import Date
|
from date import Date
|
||||||
d = Date()
|
d = Date()
|
||||||
|
@ -118,11 +119,11 @@ wday_last = d.wday_n(d.month_length) # Weekday of last day of month
|
||||||
```
|
```
|
||||||
## DST
|
## DST
|
||||||
|
|
||||||
Common microcontroller practice is for system time to be UTC or local winter
|
Common microcontroller practice is for system time to be permanently set to UTC
|
||||||
time. This avoids sudden changes which can disrupt continuously running
|
or local winter time. This avoids sudden changes in system time which can
|
||||||
applications. Where local time is required the `time_offset` method accepts the
|
disrupt continuously running applications. Where local time is required the
|
||||||
current UTC hours value (with fractional part) and returns an offset measured in
|
`time_offset` method accepts the current UTC hours value (with fractional part)
|
||||||
hours. This may be used to facilitate a displayed local time value.
|
and returns an offset measured in hours. This may be used to display local time.
|
||||||
|
|
||||||
The principal purpose of this module is to provide a lightweight `Date` class.
|
The principal purpose of this module is to provide a lightweight `Date` class.
|
||||||
Time support is rudimentary, with the `time_offset` method illustrating a
|
Time support is rudimentary, with the `time_offset` method illustrating a
|
||||||
|
|
Ładowanie…
Reference in New Issue