timelogic-api 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +293 -133
- data/docs/BulkError.md +1 -1
- data/docs/CalendarResponse.md +2 -2
- data/docs/DstResponse.md +2 -2
- data/docs/ElapsedResponse.md +1 -1
- data/docs/ErrorResponse.md +1 -1
- data/docs/TimeApi.md +151 -151
- data/docs/TimePayload.md +1 -1
- data/docs/TimezoneMatch.md +1 -1
- data/docs/TimezoneOffsetResponse.md +2 -2
- data/docs/TimezoneResolvedResponse.md +1 -1
- data/lib/timelogic-api/api/time_api.rb +169 -159
- data/lib/timelogic-api/api/utility_api.rb +1 -1
- data/lib/timelogic-api/api_client.rb +3 -1
- data/lib/timelogic-api/api_error.rb +1 -1
- data/lib/timelogic-api/configuration.rb +1 -1
- data/lib/timelogic-api/models/api_error.rb +1 -1
- data/lib/timelogic-api/models/bulk_error.rb +2 -2
- data/lib/timelogic-api/models/calendar_response.rb +3 -1
- data/lib/timelogic-api/models/diff_endpoint_ref.rb +1 -1
- data/lib/timelogic-api/models/diff_response.rb +1 -1
- data/lib/timelogic-api/models/dst_response.rb +3 -1
- data/lib/timelogic-api/models/elapsed_response.rb +2 -2
- data/lib/timelogic-api/models/error_response.rb +2 -2
- data/lib/timelogic-api/models/get_current_time200_response.rb +1 -1
- data/lib/timelogic-api/models/get_timezone200_response.rb +1 -1
- data/lib/timelogic-api/models/jwk_key.rb +1 -1
- data/lib/timelogic-api/models/jwks_response.rb +1 -1
- data/lib/timelogic-api/models/time_payload.rb +2 -1
- data/lib/timelogic-api/models/time_payload_bulk_item.rb +1 -1
- data/lib/timelogic-api/models/time_payload_bulk_response.rb +1 -1
- data/lib/timelogic-api/models/timezone_match.rb +2 -1
- data/lib/timelogic-api/models/timezone_offset_response.rb +3 -1
- data/lib/timelogic-api/models/timezone_resolved_response.rb +2 -1
- data/lib/timelogic-api/version.rb +1 -1
- data/lib/timelogic-api/world_time_api.rb +192 -0
- data/lib/timelogic-api.rb +2 -1
- metadata +3 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#TimeLogic API | A World Time API
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
#Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
|
|
@@ -22,9 +22,9 @@ module TimeLogic::Api
|
|
|
22
22
|
# Add modifiers to a timestamp
|
|
23
23
|
# Adds `seconds`, `minutes`, `hours`, and `days` to an optional base timestamp. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` - if no input timestamp is provided, the base timestamp defaults to the request time Modifiers: - `seconds=30` - `minutes=15` - `hours=2` - `days=7` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is not supported on this route Examples: - `/v1/time/add?iso=2026-04-16T09:00:00&source_tz=America/New_York&days=1&tz=Europe/London` - `/v1/time/add?minutes=30&utc=true`
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @option opts [Integer] :unix
|
|
26
|
-
# @option opts [Integer] :unix_ms
|
|
27
|
-
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`
|
|
25
|
+
# @option opts [Integer] :unix Whole Unix seconds (fractions are rejected; negative values are allowed). Valid range is -62135596800 to 253402300799 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
26
|
+
# @option opts [Integer] :unix_ms Whole Unix milliseconds. Valid range -62135596800000 to 253402300799999 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
27
|
+
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`; without a hint a local value is read as UTC. Accepted shapes are extended format with `Z`, `±HH:MM` or `±HH:MM:SS` (for example `1900-06-01T12:09:21+00:09:21`, as `iso_local` prints old local-mean-time offsets), optional fractional seconds, a space instead of `T`, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (`2027-02-29` returns 400 INVALID_TIMESTAMP rather than rolling over), and the instant must fall between 0001-01-01T00:00:00Z and 9999-12-31T23:59:59Z. A local time inside a spring-forward gap returns 400 INVALID_TIMESTAMP; an ambiguous fall-back time resolves to its first occurrence.
|
|
28
28
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
29
29
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
30
30
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
@@ -33,16 +33,16 @@ module TimeLogic::Api
|
|
|
33
33
|
# @option opts [Integer] :seconds
|
|
34
34
|
# @option opts [Integer] :minutes
|
|
35
35
|
# @option opts [Integer] :hours
|
|
36
|
-
# @option opts [Integer] :days
|
|
37
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
38
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
36
|
+
# @option opts [Integer] :days Days to add, each exactly 24 hours (86,400 seconds), so the local wall-clock time shifts across a DST change. There are no weeks/months/years modifiers; unknown parameters are ignored.
|
|
37
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
38
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
39
39
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
40
40
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
41
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
42
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
43
|
-
# @option opts [Boolean] :utc Set to `true` to force UTC on routes that support it.
|
|
44
|
-
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`.
|
|
45
|
-
# @option opts [Boolean] :sign Set to
|
|
41
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
42
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
43
|
+
# @option opts [Boolean] :utc Set to `true` to force UTC on routes that support it. Counts as a target and cannot be combined with other selectors (the AMBIGUOUS_TARGET message lists only the selector families). The response then has `iso_local=null` and `timezone=null`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
44
|
+
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Supported directives: `%a %A %b %B %C %d %D %e %F %h %H %I %j %k %l %m %M %n %p %P %r %R %s %S %t %T %u %v %w %x %X %y %Y %z %:z %Z %%`, with the `-`, `_` and `0` padding flags on numeric directives. `%Z` prints the IANA zone name (or `UTC+HH:MM` for an offset target, `UTC` with no target), not an abbreviation. Any other directive (for example `%U`, `%f`, `%Q`) or a trailing `%` returns 400 INVALID_PARAMETER naming the directive.
|
|
45
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
46
46
|
# @return [TimePayload]
|
|
47
47
|
def add_time(opts = {})
|
|
48
48
|
data, _status_code, _headers = add_time_with_http_info(opts)
|
|
@@ -52,9 +52,9 @@ module TimeLogic::Api
|
|
|
52
52
|
# Add modifiers to a timestamp
|
|
53
53
|
# Adds `seconds`, `minutes`, `hours`, and `days` to an optional base timestamp. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` - if no input timestamp is provided, the base timestamp defaults to the request time Modifiers: - `seconds=30` - `minutes=15` - `hours=2` - `days=7` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is not supported on this route Examples: - `/v1/time/add?iso=2026-04-16T09:00:00&source_tz=America/New_York&days=1&tz=Europe/London` - `/v1/time/add?minutes=30&utc=true`
|
|
54
54
|
# @param [Hash] opts the optional parameters
|
|
55
|
-
# @option opts [Integer] :unix
|
|
56
|
-
# @option opts [Integer] :unix_ms
|
|
57
|
-
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`
|
|
55
|
+
# @option opts [Integer] :unix Whole Unix seconds (fractions are rejected; negative values are allowed). Valid range is -62135596800 to 253402300799 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
56
|
+
# @option opts [Integer] :unix_ms Whole Unix milliseconds. Valid range -62135596800000 to 253402300799999 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
57
|
+
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`; without a hint a local value is read as UTC. Accepted shapes are extended format with `Z`, `±HH:MM` or `±HH:MM:SS` (for example `1900-06-01T12:09:21+00:09:21`, as `iso_local` prints old local-mean-time offsets), optional fractional seconds, a space instead of `T`, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (`2027-02-29` returns 400 INVALID_TIMESTAMP rather than rolling over), and the instant must fall between 0001-01-01T00:00:00Z and 9999-12-31T23:59:59Z. A local time inside a spring-forward gap returns 400 INVALID_TIMESTAMP; an ambiguous fall-back time resolves to its first occurrence.
|
|
58
58
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
59
59
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
60
60
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
@@ -63,16 +63,16 @@ module TimeLogic::Api
|
|
|
63
63
|
# @option opts [Integer] :seconds
|
|
64
64
|
# @option opts [Integer] :minutes
|
|
65
65
|
# @option opts [Integer] :hours
|
|
66
|
-
# @option opts [Integer] :days
|
|
67
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
68
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
66
|
+
# @option opts [Integer] :days Days to add, each exactly 24 hours (86,400 seconds), so the local wall-clock time shifts across a DST change. There are no weeks/months/years modifiers; unknown parameters are ignored.
|
|
67
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
68
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
69
69
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
70
70
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
71
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
72
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
73
|
-
# @option opts [Boolean] :utc Set to `true` to force UTC on routes that support it.
|
|
74
|
-
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`.
|
|
75
|
-
# @option opts [Boolean] :sign Set to
|
|
71
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
72
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
73
|
+
# @option opts [Boolean] :utc Set to `true` to force UTC on routes that support it. Counts as a target and cannot be combined with other selectors (the AMBIGUOUS_TARGET message lists only the selector families). The response then has `iso_local=null` and `timezone=null`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
74
|
+
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Supported directives: `%a %A %b %B %C %d %D %e %F %h %H %I %j %k %l %m %M %n %p %P %r %R %s %S %t %T %u %v %w %x %X %y %Y %z %:z %Z %%`, with the `-`, `_` and `0` padding flags on numeric directives. `%Z` prints the IANA zone name (or `UTC+HH:MM` for an offset target, `UTC` with no target), not an abbreviation. Any other directive (for example `%U`, `%f`, `%Q`) or a trailing `%` returns 400 INVALID_PARAMETER naming the directive.
|
|
75
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
76
76
|
# @return [Array<(TimePayload, Integer, Hash)>] TimePayload data, response status code and response headers
|
|
77
77
|
def add_time_with_http_info(opts = {})
|
|
78
78
|
if @api_client.config.debugging
|
|
@@ -186,25 +186,25 @@ module TimeLogic::Api
|
|
|
186
186
|
end
|
|
187
187
|
|
|
188
188
|
# Convert a timestamp into a target timezone or offset
|
|
189
|
-
# Converts one required input timestamp into a single target or a bulk array. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - exactly one input timestamp form - exactly one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is allowed only through one comma-separated `tz`, `ip`, or `offset` selector Examples: - Single target: `/v1/time/convert?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Bulk target set: `/v1/time/convert?unix=1711300000&offset=-04:00,+00:00,+09:00`
|
|
189
|
+
# Converts one required input timestamp into a single target or a bulk array. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - exactly one input timestamp form - exactly one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is allowed only through one comma-separated `tz`, `ip`, or `offset` selector with at most 10 values Examples: - Single target: `/v1/time/convert?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Bulk target set: `/v1/time/convert?unix=1711300000&offset=-04:00,+00:00,+09:00`
|
|
190
190
|
# @param [Hash] opts the optional parameters
|
|
191
|
-
# @option opts [Integer] :unix
|
|
192
|
-
# @option opts [Integer] :unix_ms
|
|
193
|
-
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`
|
|
191
|
+
# @option opts [Integer] :unix Whole Unix seconds (fractions are rejected; negative values are allowed). Valid range is -62135596800 to 253402300799 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
192
|
+
# @option opts [Integer] :unix_ms Whole Unix milliseconds. Valid range -62135596800000 to 253402300799999 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
193
|
+
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`; without a hint a local value is read as UTC. Accepted shapes are extended format with `Z`, `±HH:MM` or `±HH:MM:SS` (for example `1900-06-01T12:09:21+00:09:21`, as `iso_local` prints old local-mean-time offsets), optional fractional seconds, a space instead of `T`, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (`2027-02-29` returns 400 INVALID_TIMESTAMP rather than rolling over), and the instant must fall between 0001-01-01T00:00:00Z and 9999-12-31T23:59:59Z. A local time inside a spring-forward gap returns 400 INVALID_TIMESTAMP; an ambiguous fall-back time resolves to its first occurrence.
|
|
194
194
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
195
195
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
196
196
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
197
197
|
# @option opts [Float] :source_lon Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lat`.
|
|
198
198
|
# @option opts [String] :source_offset Used only with `iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
199
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
200
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
199
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
200
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
201
201
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
202
202
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
203
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
204
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
205
|
-
# @option opts [Boolean] :utc Set to `true` to force UTC on routes that support it.
|
|
206
|
-
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`.
|
|
207
|
-
# @option opts [Boolean] :sign Set to
|
|
203
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
204
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
205
|
+
# @option opts [Boolean] :utc Set to `true` to force UTC on routes that support it. Counts as a target and cannot be combined with other selectors (the AMBIGUOUS_TARGET message lists only the selector families). The response then has `iso_local=null` and `timezone=null`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
206
|
+
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Supported directives: `%a %A %b %B %C %d %D %e %F %h %H %I %j %k %l %m %M %n %p %P %r %R %s %S %t %T %u %v %w %x %X %y %Y %z %:z %Z %%`, with the `-`, `_` and `0` padding flags on numeric directives. `%Z` prints the IANA zone name (or `UTC+HH:MM` for an offset target, `UTC` with no target), not an abbreviation. Any other directive (for example `%U`, `%f`, `%Q`) or a trailing `%` returns 400 INVALID_PARAMETER naming the directive.
|
|
207
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
208
208
|
# @return [GetCurrentTime200Response]
|
|
209
209
|
def convert_time(opts = {})
|
|
210
210
|
data, _status_code, _headers = convert_time_with_http_info(opts)
|
|
@@ -212,25 +212,25 @@ module TimeLogic::Api
|
|
|
212
212
|
end
|
|
213
213
|
|
|
214
214
|
# Convert a timestamp into a target timezone or offset
|
|
215
|
-
# Converts one required input timestamp into a single target or a bulk array. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - exactly one input timestamp form - exactly one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is allowed only through one comma-separated `tz`, `ip`, or `offset` selector Examples: - Single target: `/v1/time/convert?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Bulk target set: `/v1/time/convert?unix=1711300000&offset=-04:00,+00:00,+09:00`
|
|
215
|
+
# Converts one required input timestamp into a single target or a bulk array. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - exactly one input timestamp form - exactly one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is allowed only through one comma-separated `tz`, `ip`, or `offset` selector with at most 10 values Examples: - Single target: `/v1/time/convert?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Bulk target set: `/v1/time/convert?unix=1711300000&offset=-04:00,+00:00,+09:00`
|
|
216
216
|
# @param [Hash] opts the optional parameters
|
|
217
|
-
# @option opts [Integer] :unix
|
|
218
|
-
# @option opts [Integer] :unix_ms
|
|
219
|
-
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`
|
|
217
|
+
# @option opts [Integer] :unix Whole Unix seconds (fractions are rejected; negative values are allowed). Valid range is -62135596800 to 253402300799 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
218
|
+
# @option opts [Integer] :unix_ms Whole Unix milliseconds. Valid range -62135596800000 to 253402300799999 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
219
|
+
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`; without a hint a local value is read as UTC. Accepted shapes are extended format with `Z`, `±HH:MM` or `±HH:MM:SS` (for example `1900-06-01T12:09:21+00:09:21`, as `iso_local` prints old local-mean-time offsets), optional fractional seconds, a space instead of `T`, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (`2027-02-29` returns 400 INVALID_TIMESTAMP rather than rolling over), and the instant must fall between 0001-01-01T00:00:00Z and 9999-12-31T23:59:59Z. A local time inside a spring-forward gap returns 400 INVALID_TIMESTAMP; an ambiguous fall-back time resolves to its first occurrence.
|
|
220
220
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
221
221
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
222
222
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
223
223
|
# @option opts [Float] :source_lon Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lat`.
|
|
224
224
|
# @option opts [String] :source_offset Used only with `iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
225
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
226
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
225
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
226
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
227
227
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
228
228
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
229
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
230
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
231
|
-
# @option opts [Boolean] :utc Set to `true` to force UTC on routes that support it.
|
|
232
|
-
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`.
|
|
233
|
-
# @option opts [Boolean] :sign Set to
|
|
229
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
230
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
231
|
+
# @option opts [Boolean] :utc Set to `true` to force UTC on routes that support it. Counts as a target and cannot be combined with other selectors (the AMBIGUOUS_TARGET message lists only the selector families). The response then has `iso_local=null` and `timezone=null`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
232
|
+
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Supported directives: `%a %A %b %B %C %d %D %e %F %h %H %I %j %k %l %m %M %n %p %P %r %R %s %S %t %T %u %v %w %x %X %y %Y %z %:z %Z %%`, with the `-`, `_` and `0` padding flags on numeric directives. `%Z` prints the IANA zone name (or `UTC+HH:MM` for an offset target, `UTC` with no target), not an abbreviation. Any other directive (for example `%U`, `%f`, `%Q`) or a trailing `%` returns 400 INVALID_PARAMETER naming the directive.
|
|
233
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
234
234
|
# @return [Array<(GetCurrentTime200Response, Integer, Hash)>] GetCurrentTime200Response data, response status code and response headers
|
|
235
235
|
def convert_time_with_http_info(opts = {})
|
|
236
236
|
if @api_client.config.debugging
|
|
@@ -340,7 +340,7 @@ module TimeLogic::Api
|
|
|
340
340
|
end
|
|
341
341
|
|
|
342
342
|
# Difference between two instants
|
|
343
|
-
# Computes the duration between `from` and `to`. Required query fields: `from` and `to` only. Do not send every optional companion field. For each side, choose one supported specifier form. A `from_*` or `to_*` companion is allowed only when that side uses `iso=...` with no explicit offset; use at most one companion selector, except that coordinate input requires its paired latitude and longitude. `from` and `to` are embedded specifier strings. Accepted specifier forms: - `from=now` - `from=unix=1711300000` - `from=unix_ms=1711300000000` - `from=iso=2026-04-16T09:00:00` - `from=tz=America/New_York` - `from=ip=8.8.8.8` - `from=offset=-05:00` - the same forms are accepted for `to` Timezone hint pairings: - `from_tz` only with `from=iso=...` that has no explicit offset - `from_ip`, `from_lat`/`from_lon`, and `from_offset` only with `from=iso=...` that has no explicit offset - `to_tz` only with `to=iso=...` that has no explicit offset - `to_ip`, `to_lat`/`to_lon`, and `to_offset` only with `to=iso=...` that has no explicit offset Selector semantics: - `tz=...`, `ip=...`, and `offset=...` inside `from` or `to` mean the current request-time instant resolved through that selector - those selector forms do not represent an arbitrary local wall-clock time - returned duration magnitudes are absolute; use `direction` to see whether `to` is after, before, or the same instant as `from` Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` Examples: - Selector-current instant: `/v1/time/diff?from=unix=1711300000&to=
|
|
343
|
+
# Computes the duration between `from` and `to`. Required query fields: `from` and `to` only. Do not send every optional companion field. For each side, choose one supported specifier form. A `from_*` or `to_*` companion is allowed only when that side uses `iso=...` with no explicit offset; use at most one companion selector, except that coordinate input requires its paired latitude and longitude. `from` and `to` are embedded specifier strings. Accepted specifier forms: - `from=now` - `from=unix=1711300000` - `from=unix_ms=1711300000000` - `from=iso=2026-04-16T09:00:00` - `from=tz=America/New_York` - `from=ip=8.8.8.8` - `from=offset=-05:00` - the same forms are accepted for `to` Timezone hint pairings: - `from_tz` only with `from=iso=...` that has no explicit offset - `from_ip`, `from_lat`/`from_lon`, and `from_offset` only with `from=iso=...` that has no explicit offset - `to_tz` only with `to=iso=...` that has no explicit offset - `to_ip`, `to_lat`/`to_lon`, and `to_offset` only with `to=iso=...` that has no explicit offset Selector semantics: - `tz=...`, `ip=...`, and `offset=...` inside `from` or `to` mean the current request-time instant resolved through that selector - those selector forms do not represent an arbitrary local wall-clock time - returned duration magnitudes are absolute; use `direction` to see whether `to` is after, before, or the same instant as `from` - because \"now\" is the same instant in every zone, `tz=`, `ip=` and `offset=` specifiers never change `seconds` or `direction`; their zone only picks the calendar date for business days - coordinates are not a specifier (`from=lat=...` returns \"Unsupported time specifier.\"); use `from_lat`/`from_lon` as a hint for a local `iso` - `seconds`, `minutes`, `hours`, `days` and the `format` placeholders are totals in each unit, not remainders; `human` is always written in hours, minutes and seconds Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` - days are counted by calendar date, start included and end excluded, unsigned - each side's date is taken in its zone when known (a `from_*`/`to_*` hint, or a `tz=`/`ip=`/`offset=` specifier), otherwise in UTC - example: `from=iso=2026-01-02T00:00:00Z&to=iso=2026-04-30T00:00:00Z&business_days=true&holiday_country=FR` returns `business_days: 83` - weekends follow the holiday calendar's country (Friday/Saturday for `SA`); a subdivision uses its country's weekend - example with a subdivision: `from=iso=2026-01-02T00:00:00Z&to=iso=2026-04-30T00:00:00Z&business_days=true&holiday_country=CH&holiday_subdivision=ZH` returns `business_days: 82` (`holiday_country=CH-ZH` is the same calendar) - example with a Friday/Saturday weekend: the same range with `holiday_country=SA` returns `business_days: 79` Examples: - Selector-current instant: `/v1/time/diff?from=unix=1711300000&to=now` - Wall-clock pairing: `/v1/time/diff?from=iso=2026-04-16T09:00:00&from_tz=America/New_York&to=iso=2026-04-16T09:00:00&to_tz=Europe/London` - Wall-clock via selector: `/v1/time/diff?from=iso=2026-01-01T12:00:00&from_ip=8.8.8.8&to=iso=2026-01-01T12:00:00&to_offset=-05:00`
|
|
344
344
|
# @param from [String] Time specifier. Supported forms are `now`, `unix=<seconds>`, `unix_ms=<milliseconds>`, `iso=<ISO-8601>`, `offset=±HH:MM`, `tz=<IANA timezone>`, and `ip=<IP address>`. For `tz=...`, `ip=...`, and `offset=...`, the specifier means the current request-time instant resolved through that selector. To express a local wall-clock time, use `from=iso=...` together with one of `from_tz`, `from_ip`, `from_lat`+`from_lon`, or `from_offset`.
|
|
345
345
|
# @param to [String] Time specifier. Supported forms are `now`, `unix=<seconds>`, `unix_ms=<milliseconds>`, `iso=<ISO-8601>`, `offset=±HH:MM`, `tz=<IANA timezone>`, and `ip=<IP address>`. For `tz=...`, `ip=...`, and `offset=...`, the specifier means the current request-time instant resolved through that selector. To express a local wall-clock time, use `to=iso=...` together with one of `to_tz`, `to_ip`, `to_lat`+`to_lon`, or `to_offset`.
|
|
346
346
|
# @param [Hash] opts the optional parameters
|
|
@@ -354,11 +354,11 @@ module TimeLogic::Api
|
|
|
354
354
|
# @option opts [Float] :to_lat Used only with `to=iso=...` when the ISO value has no explicit offset. Provide together with `to_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
355
355
|
# @option opts [Float] :to_lon Used only with `to=iso=...` when the ISO value has no explicit offset. Provide together with `to_lat`.
|
|
356
356
|
# @option opts [String] :to_offset Used only with `to=iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
357
|
-
# @option opts [String] :format Custom duration format template using `%days`, `%hours`, `%minutes`, and `%seconds`.
|
|
358
|
-
# @option opts [Boolean] :business_days Set to `true` to
|
|
359
|
-
# @option opts [String] :holiday_country ISO 3166-1 alpha-2
|
|
360
|
-
# @option opts [String] :holiday_subdivision Holiday calendar subdivision code
|
|
361
|
-
# @option opts [Boolean] :sign Set to
|
|
357
|
+
# @option opts [String] :format Custom duration format template using `%days`, `%hours`, `%minutes`, and `%seconds`. Each placeholder is the total duration in that unit, not a remainder (118 days renders `%days days %hours hours` as `118 days 2832 hours`).
|
|
358
|
+
# @option opts [Boolean] :business_days Set to `true` to add a `business_days` count. Days are counted by calendar date, start included and end excluded, unsigned; weekends follow the holiday calendar's country (Saturday/Sunday in 221 countries, Friday/Saturday in 18 such as SA, Sunday only in 8, Friday only in IR, Friday/Sunday in BN; Saturday/Sunday when no `holiday_country` is given) and holidays of the chosen calendar are skipped. Each endpoint's date is taken in its own zone when one is known (diff - from_*/to_* hints or a tz=/ip=/offset= specifier; elapsed - source_*/compare_source_*), otherwise in UTC. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
359
|
+
# @option opts [String] :holiday_country Holiday calendar: one of the 249 countries with holiday calendars (862 calendars including subdivisions, years 1900-2100), as an ISO 3166-1 alpha-2 code in any letter case, or a combined ISO 3166-2 style code such as `CH-ZH`, `US-CA` or `FR-6AE`. Requires `business_days=true`. The full list is at https://timelogicapi.com/docs#holiday-calendars and, as JSON, at https://timelogicapi.com/content/holiday-calendars.json. Any other country (for example `LK`) returns 400 INVALID_PARAMETER \"Unsupported holiday calendar.\"; a malformed value returns \"Invalid holiday_country parameter.\"; a business-day range outside 1900-2100 returns \"Holiday calendar coverage is only available for years 1900-2100.\"
|
|
360
|
+
# @option opts [String] :holiday_subdivision Holiday calendar subdivision code for the country (the ISO 3166-2 suffix, 1-3 letters or digits, any letter case), for example `ENG` (GB), `ZH` (CH), `MH` (IN), `01` (FI) or `6AE` (FR); digits and leading zeros are part of the code. Subdivisions exist for 35 countries. Requires `holiday_country` and `business_days=true`. An unknown code returns 400 INVALID_PARAMETER \"Unknown holiday_subdivision 'XX' for country DE.\" (also for `FI` + `1`, which must be `01`); a value that conflicts with a combined `holiday_country` such as `US-CA` returns 400 INVALID_PARAMETER.
|
|
361
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
362
362
|
# @return [DiffResponse]
|
|
363
363
|
def diff_time(from, to, opts = {})
|
|
364
364
|
data, _status_code, _headers = diff_time_with_http_info(from, to, opts)
|
|
@@ -366,7 +366,7 @@ module TimeLogic::Api
|
|
|
366
366
|
end
|
|
367
367
|
|
|
368
368
|
# Difference between two instants
|
|
369
|
-
# Computes the duration between `from` and `to`. Required query fields: `from` and `to` only. Do not send every optional companion field. For each side, choose one supported specifier form. A `from_*` or `to_*` companion is allowed only when that side uses `iso=...` with no explicit offset; use at most one companion selector, except that coordinate input requires its paired latitude and longitude. `from` and `to` are embedded specifier strings. Accepted specifier forms: - `from=now` - `from=unix=1711300000` - `from=unix_ms=1711300000000` - `from=iso=2026-04-16T09:00:00` - `from=tz=America/New_York` - `from=ip=8.8.8.8` - `from=offset=-05:00` - the same forms are accepted for `to` Timezone hint pairings: - `from_tz` only with `from=iso=...` that has no explicit offset - `from_ip`, `from_lat`/`from_lon`, and `from_offset` only with `from=iso=...` that has no explicit offset - `to_tz` only with `to=iso=...` that has no explicit offset - `to_ip`, `to_lat`/`to_lon`, and `to_offset` only with `to=iso=...` that has no explicit offset Selector semantics: - `tz=...`, `ip=...`, and `offset=...` inside `from` or `to` mean the current request-time instant resolved through that selector - those selector forms do not represent an arbitrary local wall-clock time - returned duration magnitudes are absolute; use `direction` to see whether `to` is after, before, or the same instant as `from` Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` Examples: - Selector-current instant: `/v1/time/diff?from=unix=1711300000&to=
|
|
369
|
+
# Computes the duration between `from` and `to`. Required query fields: `from` and `to` only. Do not send every optional companion field. For each side, choose one supported specifier form. A `from_*` or `to_*` companion is allowed only when that side uses `iso=...` with no explicit offset; use at most one companion selector, except that coordinate input requires its paired latitude and longitude. `from` and `to` are embedded specifier strings. Accepted specifier forms: - `from=now` - `from=unix=1711300000` - `from=unix_ms=1711300000000` - `from=iso=2026-04-16T09:00:00` - `from=tz=America/New_York` - `from=ip=8.8.8.8` - `from=offset=-05:00` - the same forms are accepted for `to` Timezone hint pairings: - `from_tz` only with `from=iso=...` that has no explicit offset - `from_ip`, `from_lat`/`from_lon`, and `from_offset` only with `from=iso=...` that has no explicit offset - `to_tz` only with `to=iso=...` that has no explicit offset - `to_ip`, `to_lat`/`to_lon`, and `to_offset` only with `to=iso=...` that has no explicit offset Selector semantics: - `tz=...`, `ip=...`, and `offset=...` inside `from` or `to` mean the current request-time instant resolved through that selector - those selector forms do not represent an arbitrary local wall-clock time - returned duration magnitudes are absolute; use `direction` to see whether `to` is after, before, or the same instant as `from` - because \"now\" is the same instant in every zone, `tz=`, `ip=` and `offset=` specifiers never change `seconds` or `direction`; their zone only picks the calendar date for business days - coordinates are not a specifier (`from=lat=...` returns \"Unsupported time specifier.\"); use `from_lat`/`from_lon` as a hint for a local `iso` - `seconds`, `minutes`, `hours`, `days` and the `format` placeholders are totals in each unit, not remainders; `human` is always written in hours, minutes and seconds Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` - days are counted by calendar date, start included and end excluded, unsigned - each side's date is taken in its zone when known (a `from_*`/`to_*` hint, or a `tz=`/`ip=`/`offset=` specifier), otherwise in UTC - example: `from=iso=2026-01-02T00:00:00Z&to=iso=2026-04-30T00:00:00Z&business_days=true&holiday_country=FR` returns `business_days: 83` - weekends follow the holiday calendar's country (Friday/Saturday for `SA`); a subdivision uses its country's weekend - example with a subdivision: `from=iso=2026-01-02T00:00:00Z&to=iso=2026-04-30T00:00:00Z&business_days=true&holiday_country=CH&holiday_subdivision=ZH` returns `business_days: 82` (`holiday_country=CH-ZH` is the same calendar) - example with a Friday/Saturday weekend: the same range with `holiday_country=SA` returns `business_days: 79` Examples: - Selector-current instant: `/v1/time/diff?from=unix=1711300000&to=now` - Wall-clock pairing: `/v1/time/diff?from=iso=2026-04-16T09:00:00&from_tz=America/New_York&to=iso=2026-04-16T09:00:00&to_tz=Europe/London` - Wall-clock via selector: `/v1/time/diff?from=iso=2026-01-01T12:00:00&from_ip=8.8.8.8&to=iso=2026-01-01T12:00:00&to_offset=-05:00`
|
|
370
370
|
# @param from [String] Time specifier. Supported forms are `now`, `unix=<seconds>`, `unix_ms=<milliseconds>`, `iso=<ISO-8601>`, `offset=±HH:MM`, `tz=<IANA timezone>`, and `ip=<IP address>`. For `tz=...`, `ip=...`, and `offset=...`, the specifier means the current request-time instant resolved through that selector. To express a local wall-clock time, use `from=iso=...` together with one of `from_tz`, `from_ip`, `from_lat`+`from_lon`, or `from_offset`.
|
|
371
371
|
# @param to [String] Time specifier. Supported forms are `now`, `unix=<seconds>`, `unix_ms=<milliseconds>`, `iso=<ISO-8601>`, `offset=±HH:MM`, `tz=<IANA timezone>`, and `ip=<IP address>`. For `tz=...`, `ip=...`, and `offset=...`, the specifier means the current request-time instant resolved through that selector. To express a local wall-clock time, use `to=iso=...` together with one of `to_tz`, `to_ip`, `to_lat`+`to_lon`, or `to_offset`.
|
|
372
372
|
# @param [Hash] opts the optional parameters
|
|
@@ -380,11 +380,11 @@ module TimeLogic::Api
|
|
|
380
380
|
# @option opts [Float] :to_lat Used only with `to=iso=...` when the ISO value has no explicit offset. Provide together with `to_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
381
381
|
# @option opts [Float] :to_lon Used only with `to=iso=...` when the ISO value has no explicit offset. Provide together with `to_lat`.
|
|
382
382
|
# @option opts [String] :to_offset Used only with `to=iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
383
|
-
# @option opts [String] :format Custom duration format template using `%days`, `%hours`, `%minutes`, and `%seconds`.
|
|
384
|
-
# @option opts [Boolean] :business_days Set to `true` to
|
|
385
|
-
# @option opts [String] :holiday_country ISO 3166-1 alpha-2
|
|
386
|
-
# @option opts [String] :holiday_subdivision Holiday calendar subdivision code
|
|
387
|
-
# @option opts [Boolean] :sign Set to
|
|
383
|
+
# @option opts [String] :format Custom duration format template using `%days`, `%hours`, `%minutes`, and `%seconds`. Each placeholder is the total duration in that unit, not a remainder (118 days renders `%days days %hours hours` as `118 days 2832 hours`).
|
|
384
|
+
# @option opts [Boolean] :business_days Set to `true` to add a `business_days` count. Days are counted by calendar date, start included and end excluded, unsigned; weekends follow the holiday calendar's country (Saturday/Sunday in 221 countries, Friday/Saturday in 18 such as SA, Sunday only in 8, Friday only in IR, Friday/Sunday in BN; Saturday/Sunday when no `holiday_country` is given) and holidays of the chosen calendar are skipped. Each endpoint's date is taken in its own zone when one is known (diff - from_*/to_* hints or a tz=/ip=/offset= specifier; elapsed - source_*/compare_source_*), otherwise in UTC. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
385
|
+
# @option opts [String] :holiday_country Holiday calendar: one of the 249 countries with holiday calendars (862 calendars including subdivisions, years 1900-2100), as an ISO 3166-1 alpha-2 code in any letter case, or a combined ISO 3166-2 style code such as `CH-ZH`, `US-CA` or `FR-6AE`. Requires `business_days=true`. The full list is at https://timelogicapi.com/docs#holiday-calendars and, as JSON, at https://timelogicapi.com/content/holiday-calendars.json. Any other country (for example `LK`) returns 400 INVALID_PARAMETER \"Unsupported holiday calendar.\"; a malformed value returns \"Invalid holiday_country parameter.\"; a business-day range outside 1900-2100 returns \"Holiday calendar coverage is only available for years 1900-2100.\"
|
|
386
|
+
# @option opts [String] :holiday_subdivision Holiday calendar subdivision code for the country (the ISO 3166-2 suffix, 1-3 letters or digits, any letter case), for example `ENG` (GB), `ZH` (CH), `MH` (IN), `01` (FI) or `6AE` (FR); digits and leading zeros are part of the code. Subdivisions exist for 35 countries. Requires `holiday_country` and `business_days=true`. An unknown code returns 400 INVALID_PARAMETER \"Unknown holiday_subdivision 'XX' for country DE.\" (also for `FI` + `1`, which must be `01`); a value that conflicts with a combined `holiday_country` such as `US-CA` returns 400 INVALID_PARAMETER.
|
|
387
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
388
388
|
# @return [Array<(DiffResponse, Integer, Hash)>] DiffResponse data, response status code and response headers
|
|
389
389
|
def diff_time_with_http_info(from, to, opts = {})
|
|
390
390
|
if @api_client.config.debugging
|
|
@@ -440,11 +440,16 @@ module TimeLogic::Api
|
|
|
440
440
|
fail ArgumentError, "invalid value for 'opts[:\"to_offset\"]' when calling TimeApi.diff_time, must conform to the pattern #{pattern}."
|
|
441
441
|
end
|
|
442
442
|
|
|
443
|
-
pattern = Regexp.new(/^[A-
|
|
443
|
+
pattern = Regexp.new(/^[A-Za-z]{2}(-[A-Za-z0-9]+)?$/)
|
|
444
444
|
if @api_client.config.client_side_validation && !opts[:'holiday_country'].nil? && opts[:'holiday_country'] !~ pattern
|
|
445
445
|
fail ArgumentError, "invalid value for 'opts[:\"holiday_country\"]' when calling TimeApi.diff_time, must conform to the pattern #{pattern}."
|
|
446
446
|
end
|
|
447
447
|
|
|
448
|
+
pattern = Regexp.new(/^[A-Za-z0-9]+$/)
|
|
449
|
+
if @api_client.config.client_side_validation && !opts[:'holiday_subdivision'].nil? && opts[:'holiday_subdivision'] !~ pattern
|
|
450
|
+
fail ArgumentError, "invalid value for 'opts[:\"holiday_subdivision\"]' when calling TimeApi.diff_time, must conform to the pattern #{pattern}."
|
|
451
|
+
end
|
|
452
|
+
|
|
448
453
|
# resource path
|
|
449
454
|
local_var_path = '/v1/time/diff'
|
|
450
455
|
|
|
@@ -505,23 +510,23 @@ module TimeLogic::Api
|
|
|
505
510
|
# Calendar projection for a target instant
|
|
506
511
|
# Returns calendar fields for an optional timestamp and target. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` - if no input timestamp is provided, the request time is used Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Additional flags: - `week=true` adds `week_number` Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is not supported on this route Examples: - `/v1/time/calendar?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London&week=true` - `/v1/time/calendar?unix=1711300000&auto_tz=true`
|
|
507
512
|
# @param [Hash] opts the optional parameters
|
|
508
|
-
# @option opts [Integer] :unix
|
|
509
|
-
# @option opts [Integer] :unix_ms
|
|
510
|
-
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`
|
|
513
|
+
# @option opts [Integer] :unix Whole Unix seconds (fractions are rejected; negative values are allowed). Valid range is -62135596800 to 253402300799 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
514
|
+
# @option opts [Integer] :unix_ms Whole Unix milliseconds. Valid range -62135596800000 to 253402300799999 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
515
|
+
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`; without a hint a local value is read as UTC. Accepted shapes are extended format with `Z`, `±HH:MM` or `±HH:MM:SS` (for example `1900-06-01T12:09:21+00:09:21`, as `iso_local` prints old local-mean-time offsets), optional fractional seconds, a space instead of `T`, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (`2027-02-29` returns 400 INVALID_TIMESTAMP rather than rolling over), and the instant must fall between 0001-01-01T00:00:00Z and 9999-12-31T23:59:59Z. A local time inside a spring-forward gap returns 400 INVALID_TIMESTAMP; an ambiguous fall-back time resolves to its first occurrence.
|
|
511
516
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
512
517
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
513
518
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
514
519
|
# @option opts [Float] :source_lon Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lat`.
|
|
515
520
|
# @option opts [String] :source_offset Used only with `iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
516
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
517
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
521
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
522
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
518
523
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
519
524
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
520
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
521
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
522
|
-
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`.
|
|
523
|
-
# @option opts [Boolean] :week
|
|
524
|
-
# @option opts [Boolean] :sign Set to
|
|
525
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
526
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
527
|
+
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Supported directives: `%a %A %b %B %C %d %D %e %F %h %H %I %j %k %l %m %M %n %p %P %r %R %s %S %t %T %u %v %w %x %X %y %Y %z %:z %Z %%`, with the `-`, `_` and `0` padding flags on numeric directives. `%Z` prints the IANA zone name (or `UTC+HH:MM` for an offset target, `UTC` with no target), not an abbreviation. Any other directive (for example `%U`, `%f`, `%Q`) or a trailing `%` returns 400 INVALID_PARAMETER naming the directive.
|
|
528
|
+
# @option opts [Boolean] :week Set to `true` to add the ISO 8601 `week_number`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
529
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
525
530
|
# @return [CalendarResponse]
|
|
526
531
|
def get_calendar(opts = {})
|
|
527
532
|
data, _status_code, _headers = get_calendar_with_http_info(opts)
|
|
@@ -531,23 +536,23 @@ module TimeLogic::Api
|
|
|
531
536
|
# Calendar projection for a target instant
|
|
532
537
|
# Returns calendar fields for an optional timestamp and target. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` - if no input timestamp is provided, the request time is used Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Additional flags: - `week=true` adds `week_number` Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is not supported on this route Examples: - `/v1/time/calendar?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London&week=true` - `/v1/time/calendar?unix=1711300000&auto_tz=true`
|
|
533
538
|
# @param [Hash] opts the optional parameters
|
|
534
|
-
# @option opts [Integer] :unix
|
|
535
|
-
# @option opts [Integer] :unix_ms
|
|
536
|
-
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`
|
|
539
|
+
# @option opts [Integer] :unix Whole Unix seconds (fractions are rejected; negative values are allowed). Valid range is -62135596800 to 253402300799 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
540
|
+
# @option opts [Integer] :unix_ms Whole Unix milliseconds. Valid range -62135596800000 to 253402300799999 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
541
|
+
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`; without a hint a local value is read as UTC. Accepted shapes are extended format with `Z`, `±HH:MM` or `±HH:MM:SS` (for example `1900-06-01T12:09:21+00:09:21`, as `iso_local` prints old local-mean-time offsets), optional fractional seconds, a space instead of `T`, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (`2027-02-29` returns 400 INVALID_TIMESTAMP rather than rolling over), and the instant must fall between 0001-01-01T00:00:00Z and 9999-12-31T23:59:59Z. A local time inside a spring-forward gap returns 400 INVALID_TIMESTAMP; an ambiguous fall-back time resolves to its first occurrence.
|
|
537
542
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
538
543
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
539
544
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
540
545
|
# @option opts [Float] :source_lon Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lat`.
|
|
541
546
|
# @option opts [String] :source_offset Used only with `iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
542
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
543
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
547
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
548
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
544
549
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
545
550
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
546
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
547
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
548
|
-
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`.
|
|
549
|
-
# @option opts [Boolean] :week
|
|
550
|
-
# @option opts [Boolean] :sign Set to
|
|
551
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
552
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
553
|
+
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Supported directives: `%a %A %b %B %C %d %D %e %F %h %H %I %j %k %l %m %M %n %p %P %r %R %s %S %t %T %u %v %w %x %X %y %Y %z %:z %Z %%`, with the `-`, `_` and `0` padding flags on numeric directives. `%Z` prints the IANA zone name (or `UTC+HH:MM` for an offset target, `UTC` with no target), not an abbreviation. Any other directive (for example `%U`, `%f`, `%Q`) or a trailing `%` returns 400 INVALID_PARAMETER naming the directive.
|
|
554
|
+
# @option opts [Boolean] :week Set to `true` to add the ISO 8601 `week_number`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
555
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
551
556
|
# @return [Array<(CalendarResponse, Integer, Hash)>] CalendarResponse data, response status code and response headers
|
|
552
557
|
def get_calendar_with_http_info(opts = {})
|
|
553
558
|
if @api_client.config.debugging
|
|
@@ -660,20 +665,20 @@ module TimeLogic::Api
|
|
|
660
665
|
# Returns an embeddable HTML clock fragment. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` Incompatible combinations: - `style` is required and must be one of the 30 names in the `style` enum - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - this route is single-target only; comma-separated `tz`, `ip`, and `offset` values are rejected - `auto_tz` is not supported on this route - `sign` is not supported on this route Examples: - Digital: `/v1/time/clock?style=digital-dashboard&iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Analog: `/v1/time/clock?style=analog-station&offset=-04:00`
|
|
661
666
|
# @param style [String] Clock style name. Valid values are enumerated here; there is no separate style discovery endpoint.
|
|
662
667
|
# @param [Hash] opts the optional parameters
|
|
663
|
-
# @option opts [Integer] :unix
|
|
664
|
-
# @option opts [Integer] :unix_ms
|
|
665
|
-
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`
|
|
668
|
+
# @option opts [Integer] :unix Whole Unix seconds (fractions are rejected; negative values are allowed). Valid range is -62135596800 to 253402300799 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
669
|
+
# @option opts [Integer] :unix_ms Whole Unix milliseconds. Valid range -62135596800000 to 253402300799999 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
670
|
+
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`; without a hint a local value is read as UTC. Accepted shapes are extended format with `Z`, `±HH:MM` or `±HH:MM:SS` (for example `1900-06-01T12:09:21+00:09:21`, as `iso_local` prints old local-mean-time offsets), optional fractional seconds, a space instead of `T`, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (`2027-02-29` returns 400 INVALID_TIMESTAMP rather than rolling over), and the instant must fall between 0001-01-01T00:00:00Z and 9999-12-31T23:59:59Z. A local time inside a spring-forward gap returns 400 INVALID_TIMESTAMP; an ambiguous fall-back time resolves to its first occurrence.
|
|
666
671
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
667
672
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
668
673
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
669
674
|
# @option opts [Float] :source_lon Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lat`.
|
|
670
675
|
# @option opts [String] :source_offset Used only with `iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
671
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
672
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
676
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
677
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
673
678
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
674
679
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
675
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
676
|
-
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`.
|
|
680
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
681
|
+
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Supported directives: `%a %A %b %B %C %d %D %e %F %h %H %I %j %k %l %m %M %n %p %P %r %R %s %S %t %T %u %v %w %x %X %y %Y %z %:z %Z %%`, with the `-`, `_` and `0` padding flags on numeric directives. `%Z` prints the IANA zone name (or `UTC+HH:MM` for an offset target, `UTC` with no target), not an abbreviation. Any other directive (for example `%U`, `%f`, `%Q`) or a trailing `%` returns 400 INVALID_PARAMETER naming the directive.
|
|
677
682
|
# @return [String]
|
|
678
683
|
def get_clock(style, opts = {})
|
|
679
684
|
data, _status_code, _headers = get_clock_with_http_info(style, opts)
|
|
@@ -684,20 +689,20 @@ module TimeLogic::Api
|
|
|
684
689
|
# Returns an embeddable HTML clock fragment. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` Incompatible combinations: - `style` is required and must be one of the 30 names in the `style` enum - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - this route is single-target only; comma-separated `tz`, `ip`, and `offset` values are rejected - `auto_tz` is not supported on this route - `sign` is not supported on this route Examples: - Digital: `/v1/time/clock?style=digital-dashboard&iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Analog: `/v1/time/clock?style=analog-station&offset=-04:00`
|
|
685
690
|
# @param style [String] Clock style name. Valid values are enumerated here; there is no separate style discovery endpoint.
|
|
686
691
|
# @param [Hash] opts the optional parameters
|
|
687
|
-
# @option opts [Integer] :unix
|
|
688
|
-
# @option opts [Integer] :unix_ms
|
|
689
|
-
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`
|
|
692
|
+
# @option opts [Integer] :unix Whole Unix seconds (fractions are rejected; negative values are allowed). Valid range is -62135596800 to 253402300799 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
693
|
+
# @option opts [Integer] :unix_ms Whole Unix milliseconds. Valid range -62135596800000 to 253402300799999 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
694
|
+
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`; without a hint a local value is read as UTC. Accepted shapes are extended format with `Z`, `±HH:MM` or `±HH:MM:SS` (for example `1900-06-01T12:09:21+00:09:21`, as `iso_local` prints old local-mean-time offsets), optional fractional seconds, a space instead of `T`, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (`2027-02-29` returns 400 INVALID_TIMESTAMP rather than rolling over), and the instant must fall between 0001-01-01T00:00:00Z and 9999-12-31T23:59:59Z. A local time inside a spring-forward gap returns 400 INVALID_TIMESTAMP; an ambiguous fall-back time resolves to its first occurrence.
|
|
690
695
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
691
696
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
692
697
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
693
698
|
# @option opts [Float] :source_lon Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lat`.
|
|
694
699
|
# @option opts [String] :source_offset Used only with `iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
695
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
696
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
700
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
701
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
697
702
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
698
703
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
699
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
700
|
-
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`.
|
|
704
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
705
|
+
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Supported directives: `%a %A %b %B %C %d %D %e %F %h %H %I %j %k %l %m %M %n %p %P %r %R %s %S %t %T %u %v %w %x %X %y %Y %z %:z %Z %%`, with the `-`, `_` and `0` padding flags on numeric directives. `%Z` prints the IANA zone name (or `UTC+HH:MM` for an offset target, `UTC` with no target), not an abbreviation. Any other directive (for example `%U`, `%f`, `%Q`) or a trailing `%` returns 400 INVALID_PARAMETER naming the directive.
|
|
701
706
|
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
702
707
|
def get_clock_with_http_info(style, opts = {})
|
|
703
708
|
if @api_client.config.debugging
|
|
@@ -814,16 +819,16 @@ module TimeLogic::Api
|
|
|
814
819
|
end
|
|
815
820
|
|
|
816
821
|
# Get the current time for a target
|
|
817
|
-
# Returns current time data for a single target, or a bulk array when exactly one of `tz`, `ip`, or `offset` is supplied as a comma-separated list. Target selector rules: - Use at most one selector family per request: `tz`, `ip`, `lat` + `lon`, `offset`, or `auto_tz=true`. - If no selector is provided, the response defaults to UTC with `timezone=null` and `iso_local=null`. - Bulk mode is available only through one comma-separated `tz`, `ip`, or `offset` selector and cannot be combined with any other selector. Example: - Single target: `/v1/time/current?tz=America/New_York` - For bulk, provide one comma-separated `tz`, `ip`, or `offset` value, for example `/v1/time/current?tz=America/New_York,Europe/London,Asia/Tokyo`.
|
|
822
|
+
# Returns current time data for a single target, or a bulk array when exactly one of `tz`, `ip`, or `offset` is supplied as a comma-separated list. Target selector rules: - Use at most one selector family per request: `tz`, `ip`, `lat` + `lon`, `offset`, or `auto_tz=true`. - If no selector is provided, the response defaults to UTC with `timezone=null` and `iso_local=null`. - Bulk mode is available only through one comma-separated `tz`, `ip`, or `offset` selector, accepts at most 10 values, and cannot be combined with any other selector. Example: - Single target: `/v1/time/current?tz=America/New_York` - For bulk, provide one comma-separated `tz`, `ip`, or `offset` value, for example `/v1/time/current?tz=America/New_York,Europe/London,Asia/Tokyo`.
|
|
818
823
|
# @param [Hash] opts the optional parameters
|
|
819
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
820
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
824
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
825
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
821
826
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
822
827
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
823
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
824
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
825
|
-
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`.
|
|
826
|
-
# @option opts [Boolean] :sign Set to
|
|
828
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
829
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
830
|
+
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Supported directives: `%a %A %b %B %C %d %D %e %F %h %H %I %j %k %l %m %M %n %p %P %r %R %s %S %t %T %u %v %w %x %X %y %Y %z %:z %Z %%`, with the `-`, `_` and `0` padding flags on numeric directives. `%Z` prints the IANA zone name (or `UTC+HH:MM` for an offset target, `UTC` with no target), not an abbreviation. Any other directive (for example `%U`, `%f`, `%Q`) or a trailing `%` returns 400 INVALID_PARAMETER naming the directive.
|
|
831
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
827
832
|
# @return [GetCurrentTime200Response]
|
|
828
833
|
def get_current_time(opts = {})
|
|
829
834
|
data, _status_code, _headers = get_current_time_with_http_info(opts)
|
|
@@ -831,16 +836,16 @@ module TimeLogic::Api
|
|
|
831
836
|
end
|
|
832
837
|
|
|
833
838
|
# Get the current time for a target
|
|
834
|
-
# Returns current time data for a single target, or a bulk array when exactly one of `tz`, `ip`, or `offset` is supplied as a comma-separated list. Target selector rules: - Use at most one selector family per request: `tz`, `ip`, `lat` + `lon`, `offset`, or `auto_tz=true`. - If no selector is provided, the response defaults to UTC with `timezone=null` and `iso_local=null`. - Bulk mode is available only through one comma-separated `tz`, `ip`, or `offset` selector and cannot be combined with any other selector. Example: - Single target: `/v1/time/current?tz=America/New_York` - For bulk, provide one comma-separated `tz`, `ip`, or `offset` value, for example `/v1/time/current?tz=America/New_York,Europe/London,Asia/Tokyo`.
|
|
839
|
+
# Returns current time data for a single target, or a bulk array when exactly one of `tz`, `ip`, or `offset` is supplied as a comma-separated list. Target selector rules: - Use at most one selector family per request: `tz`, `ip`, `lat` + `lon`, `offset`, or `auto_tz=true`. - If no selector is provided, the response defaults to UTC with `timezone=null` and `iso_local=null`. - Bulk mode is available only through one comma-separated `tz`, `ip`, or `offset` selector, accepts at most 10 values, and cannot be combined with any other selector. Example: - Single target: `/v1/time/current?tz=America/New_York` - For bulk, provide one comma-separated `tz`, `ip`, or `offset` value, for example `/v1/time/current?tz=America/New_York,Europe/London,Asia/Tokyo`.
|
|
835
840
|
# @param [Hash] opts the optional parameters
|
|
836
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
837
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
841
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
842
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
838
843
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
839
844
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
840
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
841
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
842
|
-
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`.
|
|
843
|
-
# @option opts [Boolean] :sign Set to
|
|
845
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
846
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
847
|
+
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Supported directives: `%a %A %b %B %C %d %D %e %F %h %H %I %j %k %l %m %M %n %p %P %r %R %s %S %t %T %u %v %w %x %X %y %Y %z %:z %Z %%`, with the `-`, `_` and `0` padding flags on numeric directives. `%Z` prints the IANA zone name (or `UTC+HH:MM` for an offset target, `UTC` with no target), not an abbreviation. Any other directive (for example `%U`, `%f`, `%Q`) or a trailing `%` returns 400 INVALID_PARAMETER naming the directive.
|
|
848
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
844
849
|
# @return [Array<(GetCurrentTime200Response, Integer, Hash)>] GetCurrentTime200Response data, response status code and response headers
|
|
845
850
|
def get_current_time_with_http_info(opts = {})
|
|
846
851
|
if @api_client.config.debugging
|
|
@@ -922,15 +927,15 @@ module TimeLogic::Api
|
|
|
922
927
|
# Daylight-saving status for a target
|
|
923
928
|
# Returns daylight-saving status for the selected target. Target selector rules: - Use at most one selector family: `tz`, `ip`, `lat` + `lon`, `offset`, or `auto_tz=true`. - If no selector is provided, the response defaults to UTC. - Bulk is not supported on this route. - `next=true` adds `next_transition` when the resolver provides a transition timestamp. Example: - `/v1/time/dst?tz=America/New_York&next=true`
|
|
924
929
|
# @param [Hash] opts the optional parameters
|
|
925
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
926
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
930
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
931
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
927
932
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
928
933
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
929
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
930
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
931
|
-
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`.
|
|
932
|
-
# @option opts [Boolean] :_next
|
|
933
|
-
# @option opts [Boolean] :sign Set to
|
|
934
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
935
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
936
|
+
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Supported directives: `%a %A %b %B %C %d %D %e %F %h %H %I %j %k %l %m %M %n %p %P %r %R %s %S %t %T %u %v %w %x %X %y %Y %z %:z %Z %%`, with the `-`, `_` and `0` padding flags on numeric directives. `%Z` prints the IANA zone name (or `UTC+HH:MM` for an offset target, `UTC` with no target), not an abbreviation. Any other directive (for example `%U`, `%f`, `%Q`) or a trailing `%` returns 400 INVALID_PARAMETER naming the directive.
|
|
937
|
+
# @option opts [Boolean] :_next Set to `true` to add `next_transition` (the next UTC offset change, or null). Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
938
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
934
939
|
# @return [DstResponse]
|
|
935
940
|
def get_dst(opts = {})
|
|
936
941
|
data, _status_code, _headers = get_dst_with_http_info(opts)
|
|
@@ -940,15 +945,15 @@ module TimeLogic::Api
|
|
|
940
945
|
# Daylight-saving status for a target
|
|
941
946
|
# Returns daylight-saving status for the selected target. Target selector rules: - Use at most one selector family: `tz`, `ip`, `lat` + `lon`, `offset`, or `auto_tz=true`. - If no selector is provided, the response defaults to UTC. - Bulk is not supported on this route. - `next=true` adds `next_transition` when the resolver provides a transition timestamp. Example: - `/v1/time/dst?tz=America/New_York&next=true`
|
|
942
947
|
# @param [Hash] opts the optional parameters
|
|
943
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
944
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
948
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
949
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
945
950
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
946
951
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
947
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
948
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
949
|
-
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`.
|
|
950
|
-
# @option opts [Boolean] :_next
|
|
951
|
-
# @option opts [Boolean] :sign Set to
|
|
952
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
953
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
954
|
+
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Supported directives: `%a %A %b %B %C %d %D %e %F %h %H %I %j %k %l %m %M %n %p %P %r %R %s %S %t %T %u %v %w %x %X %y %Y %z %:z %Z %%`, with the `-`, `_` and `0` padding flags on numeric directives. `%Z` prints the IANA zone name (or `UTC+HH:MM` for an offset target, `UTC` with no target), not an abbreviation. Any other directive (for example `%U`, `%f`, `%Q`) or a trailing `%` returns 400 INVALID_PARAMETER naming the directive.
|
|
955
|
+
# @option opts [Boolean] :_next Set to `true` to add `next_transition` (the next UTC offset change, or null). Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
956
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
952
957
|
# @return [Array<(DstResponse, Integer, Hash)>] DstResponse data, response status code and response headers
|
|
953
958
|
def get_dst_with_http_info(opts = {})
|
|
954
959
|
if @api_client.config.debugging
|
|
@@ -1029,11 +1034,11 @@ module TimeLogic::Api
|
|
|
1029
1034
|
end
|
|
1030
1035
|
|
|
1031
1036
|
# Time elapsed since or remaining until a reference instant
|
|
1032
|
-
# Computes elapsed or remaining duration relative to one required reference timestamp. Reference timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Compare timestamp forms: - `compare_unix=1711213600` - `compare_unix_ms=1711213600000` - `compare_iso=2026-04-16T09:00:00Z` - `compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - `compare_iso=2026-04-16T09:00:00&compare_source_ip=8.8.8.8` - `compare_iso=2026-04-16T09:00:00&compare_source_lat=40.7128&compare_source_lon=-74.0060` - `compare_iso=2026-04-16T09:00:00&compare_source_offset=-05:00` Compare selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Incompatible combinations: - exactly one reference timestamp form - use either one compare timestamp form or one compare selector family, not both - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - use at most one of `compare_source_tz`, `compare_source_ip`, `compare_source_lat`/`compare_source_lon`, or `compare_source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - compare local-ISO companion selectors are valid only with `compare_iso=...` that has no explicit offset - if no compare input is provided, the comparison defaults to the request time Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` Examples: - Timestamp-to-timestamp: `/v1/time/elapsed?iso=2026-04-16T09:00:00&source_tz=America/New_York&compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - Timestamp-to-selector: `/v1/time/elapsed?unix=1711300000&tz=America/New_York&business_days=true`
|
|
1037
|
+
# Computes elapsed or remaining duration relative to one required reference timestamp. Reference timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Compare timestamp forms: - `compare_unix=1711213600` - `compare_unix_ms=1711213600000` - `compare_iso=2026-04-16T09:00:00Z` - `compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - `compare_iso=2026-04-16T09:00:00&compare_source_ip=8.8.8.8` - `compare_iso=2026-04-16T09:00:00&compare_source_lat=40.7128&compare_source_lon=-74.0060` - `compare_iso=2026-04-16T09:00:00&compare_source_offset=-05:00` Compare selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Incompatible combinations: - exactly one reference timestamp form - use either one compare timestamp form or one compare selector family, not both - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - use at most one of `compare_source_tz`, `compare_source_ip`, `compare_source_lat`/`compare_source_lon`, or `compare_source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - compare local-ISO companion selectors are valid only with `compare_iso=...` that has no explicit offset - if no compare input is provided, the comparison defaults to the request time - compare selectors (`tz`, `ip`, `lat`/`lon`, `offset`, `auto_tz`) all mean the current request time, which is the same instant in every zone, so they do not change the result - equal instants return `seconds: 0` with `direction: passed` (diff returns `same`) Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` - same counting rules as diff; the reference date uses its `source_*` zone and the compare date its `compare_source_*` zone when given, otherwise UTC - weekends follow the holiday calendar's country (Friday/Saturday for `SA`); a subdivision uses its country's weekend - example with a subdivision: `iso=2026-01-02T00:00:00Z&compare_iso=2026-04-30T00:00:00Z&business_days=true&holiday_country=IN-MH` returns `business_days: 76` - example with a Friday/Saturday weekend: the same range with `holiday_country=SA` returns `business_days: 79` Examples: - Timestamp-to-timestamp: `/v1/time/elapsed?iso=2026-04-16T09:00:00&source_tz=America/New_York&compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - Timestamp-to-selector: `/v1/time/elapsed?unix=1711300000&tz=America/New_York&business_days=true`
|
|
1033
1038
|
# @param [Hash] opts the optional parameters
|
|
1034
|
-
# @option opts [Integer] :unix
|
|
1035
|
-
# @option opts [Integer] :unix_ms
|
|
1036
|
-
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`
|
|
1039
|
+
# @option opts [Integer] :unix Whole Unix seconds (fractions are rejected; negative values are allowed). Valid range is -62135596800 to 253402300799 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
1040
|
+
# @option opts [Integer] :unix_ms Whole Unix milliseconds. Valid range -62135596800000 to 253402300799999 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
1041
|
+
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`; without a hint a local value is read as UTC. Accepted shapes are extended format with `Z`, `±HH:MM` or `±HH:MM:SS` (for example `1900-06-01T12:09:21+00:09:21`, as `iso_local` prints old local-mean-time offsets), optional fractional seconds, a space instead of `T`, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (`2027-02-29` returns 400 INVALID_TIMESTAMP rather than rolling over), and the instant must fall between 0001-01-01T00:00:00Z and 9999-12-31T23:59:59Z. A local time inside a spring-forward gap returns 400 INVALID_TIMESTAMP; an ambiguous fall-back time resolves to its first occurrence.
|
|
1037
1042
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
1038
1043
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
1039
1044
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
@@ -1047,17 +1052,17 @@ module TimeLogic::Api
|
|
|
1047
1052
|
# @option opts [Float] :compare_source_lat Used only with `compare_iso=...` when the ISO value has no explicit offset. Provide together with `compare_source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
1048
1053
|
# @option opts [Float] :compare_source_lon Used only with `compare_iso=...` when the ISO value has no explicit offset. Provide together with `compare_source_lat`.
|
|
1049
1054
|
# @option opts [String] :compare_source_offset Used only with `compare_iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
1050
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
1051
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
1055
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
1056
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
1052
1057
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
1053
1058
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
1054
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
1055
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
1056
|
-
# @option opts [String] :format Custom duration format template using `%days`, `%hours`, `%minutes`, and `%seconds`.
|
|
1057
|
-
# @option opts [Boolean] :business_days Set to `true` to
|
|
1058
|
-
# @option opts [String] :holiday_country ISO 3166-1 alpha-2
|
|
1059
|
-
# @option opts [String] :holiday_subdivision Holiday calendar subdivision code
|
|
1060
|
-
# @option opts [Boolean] :sign Set to
|
|
1059
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
1060
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
1061
|
+
# @option opts [String] :format Custom duration format template using `%days`, `%hours`, `%minutes`, and `%seconds`. Each placeholder is the total duration in that unit, not a remainder (118 days renders `%days days %hours hours` as `118 days 2832 hours`).
|
|
1062
|
+
# @option opts [Boolean] :business_days Set to `true` to add a `business_days` count. Days are counted by calendar date, start included and end excluded, unsigned; weekends follow the holiday calendar's country (Saturday/Sunday in 221 countries, Friday/Saturday in 18 such as SA, Sunday only in 8, Friday only in IR, Friday/Sunday in BN; Saturday/Sunday when no `holiday_country` is given) and holidays of the chosen calendar are skipped. Each endpoint's date is taken in its own zone when one is known (diff - from_*/to_* hints or a tz=/ip=/offset= specifier; elapsed - source_*/compare_source_*), otherwise in UTC. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
1063
|
+
# @option opts [String] :holiday_country Holiday calendar: one of the 249 countries with holiday calendars (862 calendars including subdivisions, years 1900-2100), as an ISO 3166-1 alpha-2 code in any letter case, or a combined ISO 3166-2 style code such as `CH-ZH`, `US-CA` or `FR-6AE`. Requires `business_days=true`. The full list is at https://timelogicapi.com/docs#holiday-calendars and, as JSON, at https://timelogicapi.com/content/holiday-calendars.json. Any other country (for example `LK`) returns 400 INVALID_PARAMETER \"Unsupported holiday calendar.\"; a malformed value returns \"Invalid holiday_country parameter.\"; a business-day range outside 1900-2100 returns \"Holiday calendar coverage is only available for years 1900-2100.\"
|
|
1064
|
+
# @option opts [String] :holiday_subdivision Holiday calendar subdivision code for the country (the ISO 3166-2 suffix, 1-3 letters or digits, any letter case), for example `ENG` (GB), `ZH` (CH), `MH` (IN), `01` (FI) or `6AE` (FR); digits and leading zeros are part of the code. Subdivisions exist for 35 countries. Requires `holiday_country` and `business_days=true`. An unknown code returns 400 INVALID_PARAMETER \"Unknown holiday_subdivision 'XX' for country DE.\" (also for `FI` + `1`, which must be `01`); a value that conflicts with a combined `holiday_country` such as `US-CA` returns 400 INVALID_PARAMETER.
|
|
1065
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
1061
1066
|
# @return [ElapsedResponse]
|
|
1062
1067
|
def get_elapsed(opts = {})
|
|
1063
1068
|
data, _status_code, _headers = get_elapsed_with_http_info(opts)
|
|
@@ -1065,11 +1070,11 @@ module TimeLogic::Api
|
|
|
1065
1070
|
end
|
|
1066
1071
|
|
|
1067
1072
|
# Time elapsed since or remaining until a reference instant
|
|
1068
|
-
# Computes elapsed or remaining duration relative to one required reference timestamp. Reference timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Compare timestamp forms: - `compare_unix=1711213600` - `compare_unix_ms=1711213600000` - `compare_iso=2026-04-16T09:00:00Z` - `compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - `compare_iso=2026-04-16T09:00:00&compare_source_ip=8.8.8.8` - `compare_iso=2026-04-16T09:00:00&compare_source_lat=40.7128&compare_source_lon=-74.0060` - `compare_iso=2026-04-16T09:00:00&compare_source_offset=-05:00` Compare selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Incompatible combinations: - exactly one reference timestamp form - use either one compare timestamp form or one compare selector family, not both - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - use at most one of `compare_source_tz`, `compare_source_ip`, `compare_source_lat`/`compare_source_lon`, or `compare_source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - compare local-ISO companion selectors are valid only with `compare_iso=...` that has no explicit offset - if no compare input is provided, the comparison defaults to the request time Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` Examples: - Timestamp-to-timestamp: `/v1/time/elapsed?iso=2026-04-16T09:00:00&source_tz=America/New_York&compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - Timestamp-to-selector: `/v1/time/elapsed?unix=1711300000&tz=America/New_York&business_days=true`
|
|
1073
|
+
# Computes elapsed or remaining duration relative to one required reference timestamp. Reference timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Compare timestamp forms: - `compare_unix=1711213600` - `compare_unix_ms=1711213600000` - `compare_iso=2026-04-16T09:00:00Z` - `compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - `compare_iso=2026-04-16T09:00:00&compare_source_ip=8.8.8.8` - `compare_iso=2026-04-16T09:00:00&compare_source_lat=40.7128&compare_source_lon=-74.0060` - `compare_iso=2026-04-16T09:00:00&compare_source_offset=-05:00` Compare selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Incompatible combinations: - exactly one reference timestamp form - use either one compare timestamp form or one compare selector family, not both - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - use at most one of `compare_source_tz`, `compare_source_ip`, `compare_source_lat`/`compare_source_lon`, or `compare_source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - compare local-ISO companion selectors are valid only with `compare_iso=...` that has no explicit offset - if no compare input is provided, the comparison defaults to the request time - compare selectors (`tz`, `ip`, `lat`/`lon`, `offset`, `auto_tz`) all mean the current request time, which is the same instant in every zone, so they do not change the result - equal instants return `seconds: 0` with `direction: passed` (diff returns `same`) Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` - same counting rules as diff; the reference date uses its `source_*` zone and the compare date its `compare_source_*` zone when given, otherwise UTC - weekends follow the holiday calendar's country (Friday/Saturday for `SA`); a subdivision uses its country's weekend - example with a subdivision: `iso=2026-01-02T00:00:00Z&compare_iso=2026-04-30T00:00:00Z&business_days=true&holiday_country=IN-MH` returns `business_days: 76` - example with a Friday/Saturday weekend: the same range with `holiday_country=SA` returns `business_days: 79` Examples: - Timestamp-to-timestamp: `/v1/time/elapsed?iso=2026-04-16T09:00:00&source_tz=America/New_York&compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - Timestamp-to-selector: `/v1/time/elapsed?unix=1711300000&tz=America/New_York&business_days=true`
|
|
1069
1074
|
# @param [Hash] opts the optional parameters
|
|
1070
|
-
# @option opts [Integer] :unix
|
|
1071
|
-
# @option opts [Integer] :unix_ms
|
|
1072
|
-
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`
|
|
1075
|
+
# @option opts [Integer] :unix Whole Unix seconds (fractions are rejected; negative values are allowed). Valid range is -62135596800 to 253402300799 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
1076
|
+
# @option opts [Integer] :unix_ms Whole Unix milliseconds. Valid range -62135596800000 to 253402300799999 (0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999Z); values outside it return 400 INVALID_TIMESTAMP.
|
|
1077
|
+
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`; without a hint a local value is read as UTC. Accepted shapes are extended format with `Z`, `±HH:MM` or `±HH:MM:SS` (for example `1900-06-01T12:09:21+00:09:21`, as `iso_local` prints old local-mean-time offsets), optional fractional seconds, a space instead of `T`, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (`2027-02-29` returns 400 INVALID_TIMESTAMP rather than rolling over), and the instant must fall between 0001-01-01T00:00:00Z and 9999-12-31T23:59:59Z. A local time inside a spring-forward gap returns 400 INVALID_TIMESTAMP; an ambiguous fall-back time resolves to its first occurrence.
|
|
1073
1078
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
1074
1079
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
1075
1080
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
@@ -1083,17 +1088,17 @@ module TimeLogic::Api
|
|
|
1083
1088
|
# @option opts [Float] :compare_source_lat Used only with `compare_iso=...` when the ISO value has no explicit offset. Provide together with `compare_source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
1084
1089
|
# @option opts [Float] :compare_source_lon Used only with `compare_iso=...` when the ISO value has no explicit offset. Provide together with `compare_source_lat`.
|
|
1085
1090
|
# @option opts [String] :compare_source_offset Used only with `compare_iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
1086
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
1087
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
1091
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
1092
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
1088
1093
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
1089
1094
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
1090
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
1091
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
1092
|
-
# @option opts [String] :format Custom duration format template using `%days`, `%hours`, `%minutes`, and `%seconds`.
|
|
1093
|
-
# @option opts [Boolean] :business_days Set to `true` to
|
|
1094
|
-
# @option opts [String] :holiday_country ISO 3166-1 alpha-2
|
|
1095
|
-
# @option opts [String] :holiday_subdivision Holiday calendar subdivision code
|
|
1096
|
-
# @option opts [Boolean] :sign Set to
|
|
1095
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
1096
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
1097
|
+
# @option opts [String] :format Custom duration format template using `%days`, `%hours`, `%minutes`, and `%seconds`. Each placeholder is the total duration in that unit, not a remainder (118 days renders `%days days %hours hours` as `118 days 2832 hours`).
|
|
1098
|
+
# @option opts [Boolean] :business_days Set to `true` to add a `business_days` count. Days are counted by calendar date, start included and end excluded, unsigned; weekends follow the holiday calendar's country (Saturday/Sunday in 221 countries, Friday/Saturday in 18 such as SA, Sunday only in 8, Friday only in IR, Friday/Sunday in BN; Saturday/Sunday when no `holiday_country` is given) and holidays of the chosen calendar are skipped. Each endpoint's date is taken in its own zone when one is known (diff - from_*/to_* hints or a tz=/ip=/offset= specifier; elapsed - source_*/compare_source_*), otherwise in UTC. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
1099
|
+
# @option opts [String] :holiday_country Holiday calendar: one of the 249 countries with holiday calendars (862 calendars including subdivisions, years 1900-2100), as an ISO 3166-1 alpha-2 code in any letter case, or a combined ISO 3166-2 style code such as `CH-ZH`, `US-CA` or `FR-6AE`. Requires `business_days=true`. The full list is at https://timelogicapi.com/docs#holiday-calendars and, as JSON, at https://timelogicapi.com/content/holiday-calendars.json. Any other country (for example `LK`) returns 400 INVALID_PARAMETER \"Unsupported holiday calendar.\"; a malformed value returns \"Invalid holiday_country parameter.\"; a business-day range outside 1900-2100 returns \"Holiday calendar coverage is only available for years 1900-2100.\"
|
|
1100
|
+
# @option opts [String] :holiday_subdivision Holiday calendar subdivision code for the country (the ISO 3166-2 suffix, 1-3 letters or digits, any letter case), for example `ENG` (GB), `ZH` (CH), `MH` (IN), `01` (FI) or `6AE` (FR); digits and leading zeros are part of the code. Subdivisions exist for 35 countries. Requires `holiday_country` and `business_days=true`. An unknown code returns 400 INVALID_PARAMETER \"Unknown holiday_subdivision 'XX' for country DE.\" (also for `FI` + `1`, which must be `01`); a value that conflicts with a combined `holiday_country` such as `US-CA` returns 400 INVALID_PARAMETER.
|
|
1101
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
1097
1102
|
# @return [Array<(ElapsedResponse, Integer, Hash)>] ElapsedResponse data, response status code and response headers
|
|
1098
1103
|
def get_elapsed_with_http_info(opts = {})
|
|
1099
1104
|
if @api_client.config.debugging
|
|
@@ -1166,11 +1171,16 @@ module TimeLogic::Api
|
|
|
1166
1171
|
fail ArgumentError, "invalid value for 'opts[:\"offset\"]' when calling TimeApi.get_elapsed, must conform to the pattern #{pattern}."
|
|
1167
1172
|
end
|
|
1168
1173
|
|
|
1169
|
-
pattern = Regexp.new(/^[A-
|
|
1174
|
+
pattern = Regexp.new(/^[A-Za-z]{2}(-[A-Za-z0-9]+)?$/)
|
|
1170
1175
|
if @api_client.config.client_side_validation && !opts[:'holiday_country'].nil? && opts[:'holiday_country'] !~ pattern
|
|
1171
1176
|
fail ArgumentError, "invalid value for 'opts[:\"holiday_country\"]' when calling TimeApi.get_elapsed, must conform to the pattern #{pattern}."
|
|
1172
1177
|
end
|
|
1173
1178
|
|
|
1179
|
+
pattern = Regexp.new(/^[A-Za-z0-9]+$/)
|
|
1180
|
+
if @api_client.config.client_side_validation && !opts[:'holiday_subdivision'].nil? && opts[:'holiday_subdivision'] !~ pattern
|
|
1181
|
+
fail ArgumentError, "invalid value for 'opts[:\"holiday_subdivision\"]' when calling TimeApi.get_elapsed, must conform to the pattern #{pattern}."
|
|
1182
|
+
end
|
|
1183
|
+
|
|
1174
1184
|
# resource path
|
|
1175
1185
|
local_var_path = '/v1/time/elapsed'
|
|
1176
1186
|
|
|
@@ -1239,15 +1249,15 @@ module TimeLogic::Api
|
|
|
1239
1249
|
end
|
|
1240
1250
|
|
|
1241
1251
|
# Resolve timezone information for a target
|
|
1242
|
-
# Resolves timezone metadata for a single target. Target selector rules: - Use exactly one selector family: `tz`, `ip`, `lat` + `lon`, `offset`, or `auto_tz=true`. - Bulk is not supported on this route. - `offset` queries return a specialized payload
|
|
1252
|
+
# Resolves timezone metadata for a single target. Target selector rules: - Use exactly one selector family: `tz`, `ip`, `lat` + `lon`, `offset`, or `auto_tz=true`. - Bulk is not supported on this route. - With no selector the route returns 400 MISSING_TARGET. - `offset` queries return a specialized payload with `timezone=null` and `matching_zones` for the request-time offset match. Only geographic zones are listed; `UTC` and `Etc/*` are intentionally excluded (use `tz=UTC` for UTC). - `tz` names resolve to their canonical zone (`Europe/Stockholm` returns `Europe/Berlin`). - An `ip` with no timezone mapping returns 404 NOT_FOUND. Examples: - Single target: `/v1/timezone?tz=America/New_York` - Offset match: `/v1/timezone?offset=-04:00`
|
|
1243
1253
|
# @param [Hash] opts the optional parameters
|
|
1244
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
1245
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
1254
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
1255
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
1246
1256
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
1247
1257
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
1248
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
1249
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
1250
|
-
# @option opts [Boolean] :sign Set to
|
|
1258
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
1259
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
1260
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
1251
1261
|
# @return [GetTimezone200Response]
|
|
1252
1262
|
def get_timezone(opts = {})
|
|
1253
1263
|
data, _status_code, _headers = get_timezone_with_http_info(opts)
|
|
@@ -1255,15 +1265,15 @@ module TimeLogic::Api
|
|
|
1255
1265
|
end
|
|
1256
1266
|
|
|
1257
1267
|
# Resolve timezone information for a target
|
|
1258
|
-
# Resolves timezone metadata for a single target. Target selector rules: - Use exactly one selector family: `tz`, `ip`, `lat` + `lon`, `offset`, or `auto_tz=true`. - Bulk is not supported on this route. - `offset` queries return a specialized payload
|
|
1268
|
+
# Resolves timezone metadata for a single target. Target selector rules: - Use exactly one selector family: `tz`, `ip`, `lat` + `lon`, `offset`, or `auto_tz=true`. - Bulk is not supported on this route. - With no selector the route returns 400 MISSING_TARGET. - `offset` queries return a specialized payload with `timezone=null` and `matching_zones` for the request-time offset match. Only geographic zones are listed; `UTC` and `Etc/*` are intentionally excluded (use `tz=UTC` for UTC). - `tz` names resolve to their canonical zone (`Europe/Stockholm` returns `Europe/Berlin`). - An `ip` with no timezone mapping returns 404 NOT_FOUND. Examples: - Single target: `/v1/timezone?tz=America/New_York` - Offset match: `/v1/timezone?offset=-04:00`
|
|
1259
1269
|
# @param [Hash] opts the optional parameters
|
|
1260
|
-
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
1261
|
-
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
1270
|
+
# @option opts [String] :tz IANA timezone name, matched case-insensitively. Links and aliases resolve to their canonical zone, so the returned `timezone` can differ (`Europe/Stockholm` returns `Europe/Berlin`, `UTC` returns `Etc/UTC`). `Etc/GMT+5` is UTC-05:00 (POSIX sign). On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values (any comma, even a trailing one, returns an array); request URLs are limited to 8192 characters. On single-target routes a list is rejected as an invalid timezone.
|
|
1271
|
+
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
1262
1272
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
1263
1273
|
# @option opts [Float] :lon Longitude. Must be provided together with `lat`.
|
|
1264
|
-
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
1265
|
-
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
1266
|
-
# @option opts [Boolean] :sign Set to
|
|
1274
|
+
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format only (`+0530` and `+5` are rejected); URL-encode `+` as `%2B`, since an unencoded `+` is read as a space. An offset target returns `timezone=null`. On bulk-capable routes, a comma-separated list enables bulk mode with at most 10 values; request URLs are limited to 8192 characters.
|
|
1275
|
+
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with `tz`, `ip`, `lat`/`lon` or `offset`. Not supported on `/v1/time/clock`. Enabled by `true`, `1` or `yes` (case-insensitive); any other value leaves it off without an error.
|
|
1276
|
+
# @option opts [Boolean] :sign Set to `true`, `1` or `yes` (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare `sign`, or repeated `sign` values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
1267
1277
|
# @return [Array<(GetTimezone200Response, Integer, Hash)>] GetTimezone200Response data, response status code and response headers
|
|
1268
1278
|
def get_timezone_with_http_info(opts = {})
|
|
1269
1279
|
if @api_client.config.debugging
|