User Tools

Site Tools


datetime_v6_0

Date & Time

FeatureSupport
Sending
Receiving
Config

Supported Brands

None

Sender Arguments

None

Config

"devices": {
	"datetime": {
		"protocol": [ "datetime" ],
		"id": [{
			"longitude": 1.2345,
			"latitude": 12.3456,
			"ntpserver": "0.north-america.pool.ntp.org"
		}],
		"year": 2015,
		"month": 1,
		"day": 27,
		"hour": 14,
		"minute": 37,
		"second": 8,
		"weekday": 3
	}
},
"gui": {
	"datetime": {
		"name": "Date & Time",
		"group": [ "Misc" ],
		"media": [ "all" ]
	}
}

Optional Settings

GUI settings

SettingDefaultFormatDescription
show-datetime11 or 0Don't display the datetime values
formatHH:mm:ss YYYY-MM-DDsee belowDatetime formatting

Formatting

InputOutput
M, MMMonth Number (1 - 12)
MMM, MMMMMonth Name (In currently language set by moment.lang())
D, DDDay of month
DDD, DDDDDay of year
d, dd, ddd, ddddDay of week (NOTE: these formats only make sense when combined with “ww”)
eDay of week (locale) (NOTE: these formats only make sense when combined with “ww”)
EDay of week (ISO) (NOTE: this format only make sense when combined with “WW”)
w, wwWeek of the year (NOTE: combine this format with “gg” or “gggg” instead of “YY” or “YYYY”)
W, WWWeek of the year (NOTE: combine this format with “GG” or “GGGG” instead of “YY” or “YYYY”)
YY2 digit year (if greater than 68 will return 1900's, otherwise 2000's)
YYYY4 digit year
gg2 digit week year (if greater than 68 will return 1900's, otherwise 2000's)
gggg4 digit week year
GG2 digit week year (ISO) (if greater than 68 will return 1900's, otherwise 2000's)
GGGG4 digit week year (ISO)
a, AAM/PM
H, HH24 hour time
h, hh12 hour time (use in conjunction with a or A)
m, mmMinutes
s, ssSeconds
SDeciseconds (1/10th of a second)
SSCentiseconds (1/100th of a second)
SSSMilliseconds (1/1000th of a second)
Z, ZZTimezone offset as +07:00 or +0700
XUnix timestamp
LT, L, LL, LLL, LLLLLocale dependent date and time representation

Example Formatting:

"gui": {
                "datetime": {
                        "name": "Time",
                        "group": [ "Group" ],
                        "format": "HH:mm:ss"
                }
}

In this example, only the time is shown in the GUI (24h notation)

Notes

The ntp-server id is optional. The ntp server will be used to check if the time is in sync with the atomic clock.

The weekday id counts day 1 as Sunday

datetime_v6_0.txt · Last modified: 2015/11/27 22:09 (external edit)