get_dst_time

To find out when daylight saving time (DST) starts and ends within a specified interval, use the user/get_dst_time method.

Copied!
svc=user/get_dst_time&params={"timeFrom":<uint>,
			      "timeTo":<uint>,
			      "tz":<int>}

Parameters

The required parameters are marked with an asterisk (*).

Parameter Description
timeFrom* Interval beginning, UNIX time.
timeTo* Interval end, UNIX time.
tz Time zone and DST settings (see Time). If the parameter isn’t specified, the time zone of the current user is used.

Response

If the request is completed successfully, the response is returned in the following format:

Copied!
{
	"<text>":<uint>,	/* key: time, UNIX time; value: 1 if DST is in effect from this time, 0 if it isn't */
	...
}

The first key of the object is the value of timeFrom, and its value shows whether DST is in effect at the beginning of the interval. The next keys are the times when DST starts (value 1) or ends (value 0) within the interval. The last key is the value of timeTo.

If DST isn’t used in the specified time zone, an empty object is returned:

Copied!
{}

If the request fails, an error code is returned.

Error codes

Error code Description
4 Invalid input parameters, or the current user isn’t found.

If you find a mistake in the text, please select it and press Ctrl+Enter.