change olsen to olson, keywords and README

pull/29/head
mike-s123 7 years ago
parent 5f7193b940
commit 0c4a687032

@ -292,7 +292,7 @@ Note that this function is used internally by ezTime, but does not by itself set
Timezones in ezTime are objects. They can be created with `Timezone yourTZ`, where `yourTZ` is the name you choose to refer to the timezone. In this manual, this name will be used from now on. But you can naturally choose any name you want. Timezones in ezTime are objects. They can be created with `Timezone yourTZ`, where `yourTZ` is the name you choose to refer to the timezone. In this manual, this name will be used from now on. But you can naturally choose any name you want.
Internally, ezTime stores everything it knows about a timezone as two strings. One is the official name of the timezone in "Olsen" format (like `Europe/Berlin`). That name is used to then update when needed all the other information needed to represent time in that timezone. This is in another string, in so-called "posix" format. It's often a little longer and for Berlin it is `CET-1CEST,M3.4.0/2,M10.4.0/3`. The elements of this string have the following meanings: Internally, ezTime stores everything it knows about a timezone as two strings. One is the official name of the timezone in "Olson" format (like `Europe/Berlin`). That name is used to then update when needed all the other information needed to represent time in that timezone. This is in another string, in so-called "posix" format. It's often a little longer and for Berlin it is `CET-1CEST,M3.4.0/2,M10.4.0/3`. The elements of this string have the following meanings:
| Element | meaning | | Element | meaning |
| ---- | ---- | | ---- | ---- |
@ -370,7 +370,7 @@ Provide the offset from UTC in minutes at the indicated time (or now if you do n
`boolsetLocation(String location = "")`    — **MUST** be prefixed with name of a timezone `boolsetLocation(String location = "")`    — **MUST** be prefixed with name of a timezone
With `setLocation` you can provide a string to do an internet lookup for a timezone. The string can either be an Olsen timezone name, like `Europe/Berlin` (or some unique part of such a name). ([Here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) is a complete list of these names.) Or it can be a two-letter country code for any country that does not span multiple timezones, like `NL` or `DE` (but not `US`). After the information is retrieved, it is loaded in the current timezone, and cached if a cache is set (see below). `setLocation` will return `false` (Setting either `NO_NETWORK`, `DATA_NOT_FOUND` or `SERVER_ERROR`) if it cannot get timezone information. With `setLocation` you can provide a string to do an internet lookup for a timezone. The string can either be an Olson timezone name, like `Europe/Berlin` (or some unique part of such a name). ([Here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) is a complete list of these names.) Or it can be a two-letter country code for any country that does not span multiple timezones, like `NL` or `DE` (but not `US`). After the information is retrieved, it is loaded in the current timezone, and cached if a cache is set (see below). `setLocation` will return `false` (Setting either `NO_NETWORK`, `DATA_NOT_FOUND` or `SERVER_ERROR`) if it cannot get timezone information.
If you provide no location ( `YourTZ.setLocation()` ), ezTime will attempt to do a GeoIP lookup to find the country associated with your IP-address. If that is a country that has a single timezone, that timezone will be loaded, otherwise a `SERVER_ERROR` ("Country Spans Multiple Timezones") will result. If you provide no location ( `YourTZ.setLocation()` ), ezTime will attempt to do a GeoIP lookup to find the country associated with your IP-address. If that is a country that has a single timezone, that timezone will be loaded, otherwise a `SERVER_ERROR` ("Country Spans Multiple Timezones") will result.
@ -410,7 +410,7 @@ To only get the timezone data from the internet when the cache is empty or outda
`bool setCache(int16_t address)`    — **MUST** be prefixed with name of a timezone `bool setCache(int16_t address)`    — **MUST** be prefixed with name of a timezone
If your ezTime is compiled with `#define EZTIME_CACHE_EEPROM` (which is the default), you can supply an EEPROM location. A single timezone needs 50 bytes to cache. The data is written in compressed form so that the Olsen and Posix strings fit in 3/4 of the space they would normally take up, and along with it is stored a checksum, a length field and a single byte for the month in which the cache was retrieved, in months after January 2018. If your ezTime is compiled with `#define EZTIME_CACHE_EEPROM` (which is the default), you can supply an EEPROM location. A single timezone needs 50 bytes to cache. The data is written in compressed form so that the Olson and Posix strings fit in 3/4 of the space they would normally take up, and along with it is stored a checksum, a length field and a single byte for the month in which the cache was retrieved, in months after January 2018.
`bool setCache(String name, String key)`    — **MUST** be prefixed with name of a timezone `bool setCache(String name, String key)`    — **MUST** be prefixed with name of a timezone
@ -473,7 +473,7 @@ We'll start with one of the most powerful functions of ezTime. With `dateTime` y
| `s` | Seconds with leading zero | `s` | Seconds with leading zero
| `T` | abbreviation for timezone, like `CEST` | `T` | abbreviation for timezone, like `CEST`
| `v` | milliseconds as three digits | `v` | milliseconds as three digits
| `e` | Timezone identifier (Olsen name), like `Europe/Berlin` | `e` | Timezone identifier (Olson name), like `Europe/Berlin`
| `O` | Difference to Greenwich time (GMT) in hours and minutes written together, like `+0200`. Here a positive offset means east of UTC. | `O` | Difference to Greenwich time (GMT) in hours and minutes written together, like `+0200`. Here a positive offset means east of UTC.
| `P` | Same as O but with a colon between hours and minutes, like `+02:00` | `P` | Same as O but with a colon between hours and minutes, like `+02:00`
| `Z` | Timezone offset in seconds. West of UTC is negative, east of UTC is positive. | `Z` | Timezone offset in seconds. West of UTC is negative, east of UTC is positive.
@ -1027,7 +1027,7 @@ ezTime 0.7.2 runs fine (No networking on board, so tested with NoNetwork example
| [**`events`**](#events) | `void` | | no | no | no | [**`events`**](#events) | `void` | | no | no | no
| [**`getOffset`**](#getoffset) | `int16_t` | `TIME` | optional | no | no | [**`getOffset`**](#getoffset) | `int16_t` | `TIME` | optional | no | no
| **function** | **returns** | **arguments** | **TZ prefix** | **network** | **cache** | | **function** | **returns** | **arguments** | **TZ prefix** | **network** | **cache** |
| [**`getOlsen`**](#getolsen) | `String` | | optional | yes | yes | | [**`getOlson`**](#getolson) | `String` | | optional | yes | yes |
| [**`getPosix`**](#getposix) | `String` | | yes | no | no | [**`getPosix`**](#getposix) | `String` | | yes | no | no
| [**`getTimezoneName`**](#gettimezonename) | `String` | `TIME` | optional | no | no | [**`getTimezoneName`**](#gettimezonename) | `String` | `TIME` | optional | no | no
| [**`hour`**](#time-and-date-as-numbers) | `uint8_t` | `TIME` | optional | no | no | [**`hour`**](#time-and-date-as-numbers) | `uint8_t` | `TIME` | optional | no | no

@ -53,7 +53,7 @@ militaryTZ KEYWORD2
setLocation KEYWORD2 setLocation KEYWORD2
setCache KEYWORD2 setCache KEYWORD2
clearCache KEYWORD2 clearCache KEYWORD2
getOlsen KEYWORD2 getOlson KEYWORD2
# TimeLib compatibility # TimeLib compatibility

Loading…
Cancel
Save