timelogic-api 1.0.3 → 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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +293 -133
  3. data/docs/BulkError.md +1 -1
  4. data/docs/CalendarResponse.md +2 -2
  5. data/docs/DstResponse.md +2 -2
  6. data/docs/ElapsedResponse.md +1 -1
  7. data/docs/ErrorResponse.md +1 -1
  8. data/docs/TimeApi.md +151 -151
  9. data/docs/TimePayload.md +1 -1
  10. data/docs/TimezoneMatch.md +1 -1
  11. data/docs/TimezoneOffsetResponse.md +2 -2
  12. data/docs/TimezoneResolvedResponse.md +1 -1
  13. data/lib/timelogic-api/api/time_api.rb +169 -159
  14. data/lib/timelogic-api/api/utility_api.rb +1 -1
  15. data/lib/timelogic-api/api_client.rb +3 -1
  16. data/lib/timelogic-api/api_error.rb +1 -1
  17. data/lib/timelogic-api/configuration.rb +1 -1
  18. data/lib/timelogic-api/models/api_error.rb +1 -1
  19. data/lib/timelogic-api/models/bulk_error.rb +2 -2
  20. data/lib/timelogic-api/models/calendar_response.rb +3 -1
  21. data/lib/timelogic-api/models/diff_endpoint_ref.rb +1 -1
  22. data/lib/timelogic-api/models/diff_response.rb +1 -1
  23. data/lib/timelogic-api/models/dst_response.rb +3 -1
  24. data/lib/timelogic-api/models/elapsed_response.rb +2 -2
  25. data/lib/timelogic-api/models/error_response.rb +2 -2
  26. data/lib/timelogic-api/models/get_current_time200_response.rb +1 -1
  27. data/lib/timelogic-api/models/get_timezone200_response.rb +1 -1
  28. data/lib/timelogic-api/models/jwk_key.rb +1 -1
  29. data/lib/timelogic-api/models/jwks_response.rb +1 -1
  30. data/lib/timelogic-api/models/time_payload.rb +2 -1
  31. data/lib/timelogic-api/models/time_payload_bulk_item.rb +1 -1
  32. data/lib/timelogic-api/models/time_payload_bulk_response.rb +1 -1
  33. data/lib/timelogic-api/models/timezone_match.rb +2 -1
  34. data/lib/timelogic-api/models/timezone_offset_response.rb +3 -1
  35. data/lib/timelogic-api/models/timezone_resolved_response.rb +2 -1
  36. data/lib/timelogic-api/version.rb +1 -1
  37. data/lib/timelogic-api/world_time_api.rb +192 -0
  38. data/lib/timelogic-api.rb +2 -1
  39. metadata +3 -2
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;; without a hint a local value is read as UTC. Accepted shapes are extended format with &#x60;Z&#x60;, &#x60;±HH:MM&#x60; or &#x60;±HH:MM:SS&#x60; (for example &#x60;1900-06-01T12:09:21+00:09:21&#x60;, as &#x60;iso_local&#x60; prints old local-mean-time offsets), optional fractional seconds, a space instead of &#x60;T&#x60;, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (&#x60;2027-02-29&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset.
29
29
  # @option opts [String] :source_ip Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lon&#x60; 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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
40
40
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
41
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
42
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
43
- # @option opts [Boolean] :utc Set to &#x60;true&#x60; to force UTC on routes that support it.
44
- # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Reference: [strftime](https://strftime.net/).
45
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
41
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
43
+ # @option opts [Boolean] :utc Set to &#x60;true&#x60; 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 &#x60;iso_local&#x3D;null&#x60; and &#x60;timezone&#x3D;null&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
44
+ # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Supported directives: &#x60;%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 %%&#x60;, with the &#x60;-&#x60;, &#x60;_&#x60; and &#x60;0&#x60; padding flags on numeric directives. &#x60;%Z&#x60; prints the IANA zone name (or &#x60;UTC+HH:MM&#x60; for an offset target, &#x60;UTC&#x60; with no target), not an abbreviation. Any other directive (for example &#x60;%U&#x60;, &#x60;%f&#x60;, &#x60;%Q&#x60;) or a trailing &#x60;%&#x60; returns 400 INVALID_PARAMETER naming the directive.
45
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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 &#x60;seconds&#x60;, &#x60;minutes&#x60;, &#x60;hours&#x60;, and &#x60;days&#x60; to an optional base timestamp. Input timestamp forms: - &#x60;unix&#x3D;1711300000&#x60; - &#x60;unix_ms&#x3D;1711300000000&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00Z&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_ip&#x3D;8.8.8.8&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_lat&#x3D;40.7128&amp;source_lon&#x3D;-74.0060&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_offset&#x3D;-05:00&#x60; - if no input timestamp is provided, the base timestamp defaults to the request time Modifiers: - &#x60;seconds&#x3D;30&#x60; - &#x60;minutes&#x3D;15&#x60; - &#x60;hours&#x3D;2&#x60; - &#x60;days&#x3D;7&#x60; Target selector forms: - &#x60;tz&#x3D;America/New_York&#x60; - &#x60;ip&#x3D;8.8.8.8&#x60; - &#x60;lat&#x3D;40.7128&amp;lon&#x3D;-74.0060&#x60; - &#x60;offset&#x3D;-04:00&#x60; - &#x60;auto_tz&#x3D;true&#x60; - &#x60;utc&#x3D;true&#x60; Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of &#x60;source_tz&#x60;, &#x60;source_ip&#x60;, &#x60;source_lat&#x60;/&#x60;source_lon&#x60;, or &#x60;source_offset&#x60; - local-ISO companion selectors are valid only with &#x60;iso&#x3D;...&#x60; that has no explicit offset - bulk is not supported on this route Examples: - &#x60;/v1/time/add?iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&amp;days&#x3D;1&amp;tz&#x3D;Europe/London&#x60; - &#x60;/v1/time/add?minutes&#x3D;30&amp;utc&#x3D;true&#x60;
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;; without a hint a local value is read as UTC. Accepted shapes are extended format with &#x60;Z&#x60;, &#x60;±HH:MM&#x60; or &#x60;±HH:MM:SS&#x60; (for example &#x60;1900-06-01T12:09:21+00:09:21&#x60;, as &#x60;iso_local&#x60; prints old local-mean-time offsets), optional fractional seconds, a space instead of &#x60;T&#x60;, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (&#x60;2027-02-29&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset.
59
59
  # @option opts [String] :source_ip Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lon&#x60; 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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
70
70
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
71
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
72
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
73
- # @option opts [Boolean] :utc Set to &#x60;true&#x60; to force UTC on routes that support it.
74
- # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Reference: [strftime](https://strftime.net/).
75
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
71
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
73
+ # @option opts [Boolean] :utc Set to &#x60;true&#x60; 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 &#x60;iso_local&#x3D;null&#x60; and &#x60;timezone&#x3D;null&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
74
+ # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Supported directives: &#x60;%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 %%&#x60;, with the &#x60;-&#x60;, &#x60;_&#x60; and &#x60;0&#x60; padding flags on numeric directives. &#x60;%Z&#x60; prints the IANA zone name (or &#x60;UTC+HH:MM&#x60; for an offset target, &#x60;UTC&#x60; with no target), not an abbreviation. Any other directive (for example &#x60;%U&#x60;, &#x60;%f&#x60;, &#x60;%Q&#x60;) or a trailing &#x60;%&#x60; returns 400 INVALID_PARAMETER naming the directive.
75
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;; without a hint a local value is read as UTC. Accepted shapes are extended format with &#x60;Z&#x60;, &#x60;±HH:MM&#x60; or &#x60;±HH:MM:SS&#x60; (for example &#x60;1900-06-01T12:09:21+00:09:21&#x60;, as &#x60;iso_local&#x60; prints old local-mean-time offsets), optional fractional seconds, a space instead of &#x60;T&#x60;, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (&#x60;2027-02-29&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset.
195
195
  # @option opts [String] :source_ip Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lon&#x60; to resolve that local wall-clock time through the timezone mapped from these coordinates.
197
197
  # @option opts [Float] :source_lon Used only with &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lat&#x60;.
198
198
  # @option opts [String] :source_offset Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
202
202
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
203
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
204
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
205
- # @option opts [Boolean] :utc Set to &#x60;true&#x60; to force UTC on routes that support it.
206
- # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Reference: [strftime](https://strftime.net/).
207
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
203
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
205
+ # @option opts [Boolean] :utc Set to &#x60;true&#x60; 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 &#x60;iso_local&#x3D;null&#x60; and &#x60;timezone&#x3D;null&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
206
+ # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Supported directives: &#x60;%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 %%&#x60;, with the &#x60;-&#x60;, &#x60;_&#x60; and &#x60;0&#x60; padding flags on numeric directives. &#x60;%Z&#x60; prints the IANA zone name (or &#x60;UTC+HH:MM&#x60; for an offset target, &#x60;UTC&#x60; with no target), not an abbreviation. Any other directive (for example &#x60;%U&#x60;, &#x60;%f&#x60;, &#x60;%Q&#x60;) or a trailing &#x60;%&#x60; returns 400 INVALID_PARAMETER naming the directive.
207
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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: - &#x60;unix&#x3D;1711300000&#x60; - &#x60;unix_ms&#x3D;1711300000000&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00Z&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_ip&#x3D;8.8.8.8&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_lat&#x3D;40.7128&amp;source_lon&#x3D;-74.0060&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_offset&#x3D;-05:00&#x60; Target selector forms: - &#x60;tz&#x3D;America/New_York&#x60; - &#x60;ip&#x3D;8.8.8.8&#x60; - &#x60;lat&#x3D;40.7128&amp;lon&#x3D;-74.0060&#x60; - &#x60;offset&#x3D;-04:00&#x60; - &#x60;auto_tz&#x3D;true&#x60; - &#x60;utc&#x3D;true&#x60; Incompatible combinations: - exactly one input timestamp form - exactly one target selector family - use at most one of &#x60;source_tz&#x60;, &#x60;source_ip&#x60;, &#x60;source_lat&#x60;/&#x60;source_lon&#x60;, or &#x60;source_offset&#x60; - local-ISO companion selectors are valid only with &#x60;iso&#x3D;...&#x60; that has no explicit offset - bulk is allowed only through one comma-separated &#x60;tz&#x60;, &#x60;ip&#x60;, or &#x60;offset&#x60; selector Examples: - Single target: &#x60;/v1/time/convert?iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&amp;tz&#x3D;Europe/London&#x60; - Bulk target set: &#x60;/v1/time/convert?unix&#x3D;1711300000&amp;offset&#x3D;-04:00,+00:00,+09:00&#x60;
215
+ # Converts one required input timestamp into a single target or a bulk array. Input timestamp forms: - &#x60;unix&#x3D;1711300000&#x60; - &#x60;unix_ms&#x3D;1711300000000&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00Z&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_ip&#x3D;8.8.8.8&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_lat&#x3D;40.7128&amp;source_lon&#x3D;-74.0060&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_offset&#x3D;-05:00&#x60; Target selector forms: - &#x60;tz&#x3D;America/New_York&#x60; - &#x60;ip&#x3D;8.8.8.8&#x60; - &#x60;lat&#x3D;40.7128&amp;lon&#x3D;-74.0060&#x60; - &#x60;offset&#x3D;-04:00&#x60; - &#x60;auto_tz&#x3D;true&#x60; - &#x60;utc&#x3D;true&#x60; Incompatible combinations: - exactly one input timestamp form - exactly one target selector family - use at most one of &#x60;source_tz&#x60;, &#x60;source_ip&#x60;, &#x60;source_lat&#x60;/&#x60;source_lon&#x60;, or &#x60;source_offset&#x60; - local-ISO companion selectors are valid only with &#x60;iso&#x3D;...&#x60; that has no explicit offset - bulk is allowed only through one comma-separated &#x60;tz&#x60;, &#x60;ip&#x60;, or &#x60;offset&#x60; selector with at most 10 values Examples: - Single target: &#x60;/v1/time/convert?iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&amp;tz&#x3D;Europe/London&#x60; - Bulk target set: &#x60;/v1/time/convert?unix&#x3D;1711300000&amp;offset&#x3D;-04:00,+00:00,+09:00&#x60;
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;; without a hint a local value is read as UTC. Accepted shapes are extended format with &#x60;Z&#x60;, &#x60;±HH:MM&#x60; or &#x60;±HH:MM:SS&#x60; (for example &#x60;1900-06-01T12:09:21+00:09:21&#x60;, as &#x60;iso_local&#x60; prints old local-mean-time offsets), optional fractional seconds, a space instead of &#x60;T&#x60;, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (&#x60;2027-02-29&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset.
221
221
  # @option opts [String] :source_ip Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lon&#x60; to resolve that local wall-clock time through the timezone mapped from these coordinates.
223
223
  # @option opts [Float] :source_lon Used only with &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lat&#x60;.
224
224
  # @option opts [String] :source_offset Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
228
228
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
229
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
230
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
231
- # @option opts [Boolean] :utc Set to &#x60;true&#x60; to force UTC on routes that support it.
232
- # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Reference: [strftime](https://strftime.net/).
233
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
229
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
231
+ # @option opts [Boolean] :utc Set to &#x60;true&#x60; 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 &#x60;iso_local&#x3D;null&#x60; and &#x60;timezone&#x3D;null&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
232
+ # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Supported directives: &#x60;%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 %%&#x60;, with the &#x60;-&#x60;, &#x60;_&#x60; and &#x60;0&#x60; padding flags on numeric directives. &#x60;%Z&#x60; prints the IANA zone name (or &#x60;UTC+HH:MM&#x60; for an offset target, &#x60;UTC&#x60; with no target), not an abbreviation. Any other directive (for example &#x60;%U&#x60;, &#x60;%f&#x60;, &#x60;%Q&#x60;) or a trailing &#x60;%&#x60; returns 400 INVALID_PARAMETER naming the directive.
233
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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=tz=America/New_York` - 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`
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 &#x60;now&#x60;, &#x60;unix&#x3D;&lt;seconds&gt;&#x60;, &#x60;unix_ms&#x3D;&lt;milliseconds&gt;&#x60;, &#x60;iso&#x3D;&lt;ISO-8601&gt;&#x60;, &#x60;offset&#x3D;±HH:MM&#x60;, &#x60;tz&#x3D;&lt;IANA timezone&gt;&#x60;, and &#x60;ip&#x3D;&lt;IP address&gt;&#x60;. For &#x60;tz&#x3D;...&#x60;, &#x60;ip&#x3D;...&#x60;, and &#x60;offset&#x3D;...&#x60;, the specifier means the current request-time instant resolved through that selector. To express a local wall-clock time, use &#x60;from&#x3D;iso&#x3D;...&#x60; together with one of &#x60;from_tz&#x60;, &#x60;from_ip&#x60;, &#x60;from_lat&#x60;+&#x60;from_lon&#x60;, or &#x60;from_offset&#x60;.
345
345
  # @param to [String] Time specifier. Supported forms are &#x60;now&#x60;, &#x60;unix&#x3D;&lt;seconds&gt;&#x60;, &#x60;unix_ms&#x3D;&lt;milliseconds&gt;&#x60;, &#x60;iso&#x3D;&lt;ISO-8601&gt;&#x60;, &#x60;offset&#x3D;±HH:MM&#x60;, &#x60;tz&#x3D;&lt;IANA timezone&gt;&#x60;, and &#x60;ip&#x3D;&lt;IP address&gt;&#x60;. For &#x60;tz&#x3D;...&#x60;, &#x60;ip&#x3D;...&#x60;, and &#x60;offset&#x3D;...&#x60;, the specifier means the current request-time instant resolved through that selector. To express a local wall-clock time, use &#x60;to&#x3D;iso&#x3D;...&#x60; together with one of &#x60;to_tz&#x60;, &#x60;to_ip&#x60;, &#x60;to_lat&#x60;+&#x60;to_lon&#x60;, or &#x60;to_offset&#x60;.
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 &#x60;to&#x3D;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;to_lon&#x60; to resolve that local wall-clock time through the timezone mapped from these coordinates.
355
355
  # @option opts [Float] :to_lon Used only with &#x60;to&#x3D;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;to_lat&#x60;.
356
356
  # @option opts [String] :to_offset Used only with &#x60;to&#x3D;iso&#x3D;...&#x60; 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 &#x60;%days&#x60;, &#x60;%hours&#x60;, &#x60;%minutes&#x60;, and &#x60;%seconds&#x60;.
358
- # @option opts [Boolean] :business_days Set to &#x60;true&#x60; to enable weekday/business-day counting.
359
- # @option opts [String] :holiday_country ISO 3166-1 alpha-2 holiday calendar country code. Requires &#x60;business_days&#x3D;true&#x60;.
360
- # @option opts [String] :holiday_subdivision Holiday calendar subdivision code from the upstream &#x60;python-holidays&#x60; calendar, for example &#x60;CA&#x60; or &#x60;ENG&#x60;. Requires &#x60;holiday_country&#x60; and &#x60;business_days&#x3D;true&#x60;.
361
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
357
+ # @option opts [String] :format Custom duration format template using &#x60;%days&#x60;, &#x60;%hours&#x60;, &#x60;%minutes&#x60;, and &#x60;%seconds&#x60;. Each placeholder is the total duration in that unit, not a remainder (118 days renders &#x60;%days days %hours hours&#x60; as &#x60;118 days 2832 hours&#x60;).
358
+ # @option opts [Boolean] :business_days Set to &#x60;true&#x60; to add a &#x60;business_days&#x60; count. Days are counted by calendar date, start included and end excluded, unsigned; weekends follow the holiday calendar&#39;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 &#x60;holiday_country&#x60; is given) and holidays of the chosen calendar are skipped. Each endpoint&#39;s date is taken in its own zone when one is known (diff - from_*/to_* hints or a tz&#x3D;/ip&#x3D;/offset&#x3D; specifier; elapsed - source_*/compare_source_*), otherwise in UTC. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (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 &#x60;CH-ZH&#x60;, &#x60;US-CA&#x60; or &#x60;FR-6AE&#x60;. Requires &#x60;business_days&#x3D;true&#x60;. 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 &#x60;LK&#x60;) returns 400 INVALID_PARAMETER \&quot;Unsupported holiday calendar.\&quot;; a malformed value returns \&quot;Invalid holiday_country parameter.\&quot;; a business-day range outside 1900-2100 returns \&quot;Holiday calendar coverage is only available for years 1900-2100.\&quot;
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 &#x60;ENG&#x60; (GB), &#x60;ZH&#x60; (CH), &#x60;MH&#x60; (IN), &#x60;01&#x60; (FI) or &#x60;6AE&#x60; (FR); digits and leading zeros are part of the code. Subdivisions exist for 35 countries. Requires &#x60;holiday_country&#x60; and &#x60;business_days&#x3D;true&#x60;. An unknown code returns 400 INVALID_PARAMETER \&quot;Unknown holiday_subdivision &#39;XX&#39; for country DE.\&quot; (also for &#x60;FI&#x60; + &#x60;1&#x60;, which must be &#x60;01&#x60;); a value that conflicts with a combined &#x60;holiday_country&#x60; such as &#x60;US-CA&#x60; returns 400 INVALID_PARAMETER.
361
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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 &#x60;from&#x60; and &#x60;to&#x60;. Required query fields: &#x60;from&#x60; and &#x60;to&#x60; only. Do not send every optional companion field. For each side, choose one supported specifier form. A &#x60;from_*&#x60; or &#x60;to_*&#x60; companion is allowed only when that side uses &#x60;iso&#x3D;...&#x60; with no explicit offset; use at most one companion selector, except that coordinate input requires its paired latitude and longitude. &#x60;from&#x60; and &#x60;to&#x60; are embedded specifier strings. Accepted specifier forms: - &#x60;from&#x3D;now&#x60; - &#x60;from&#x3D;unix&#x3D;1711300000&#x60; - &#x60;from&#x3D;unix_ms&#x3D;1711300000000&#x60; - &#x60;from&#x3D;iso&#x3D;2026-04-16T09:00:00&#x60; - &#x60;from&#x3D;tz&#x3D;America/New_York&#x60; - &#x60;from&#x3D;ip&#x3D;8.8.8.8&#x60; - &#x60;from&#x3D;offset&#x3D;-05:00&#x60; - the same forms are accepted for &#x60;to&#x60; Timezone hint pairings: - &#x60;from_tz&#x60; only with &#x60;from&#x3D;iso&#x3D;...&#x60; that has no explicit offset - &#x60;from_ip&#x60;, &#x60;from_lat&#x60;/&#x60;from_lon&#x60;, and &#x60;from_offset&#x60; only with &#x60;from&#x3D;iso&#x3D;...&#x60; that has no explicit offset - &#x60;to_tz&#x60; only with &#x60;to&#x3D;iso&#x3D;...&#x60; that has no explicit offset - &#x60;to_ip&#x60;, &#x60;to_lat&#x60;/&#x60;to_lon&#x60;, and &#x60;to_offset&#x60; only with &#x60;to&#x3D;iso&#x3D;...&#x60; that has no explicit offset Selector semantics: - &#x60;tz&#x3D;...&#x60;, &#x60;ip&#x3D;...&#x60;, and &#x60;offset&#x3D;...&#x60; inside &#x60;from&#x60; or &#x60;to&#x60; 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 &#x60;direction&#x60; to see whether &#x60;to&#x60; is after, before, or the same instant as &#x60;from&#x60; Business-day rules: - &#x60;holiday_country&#x60; and &#x60;holiday_subdivision&#x60; require &#x60;business_days&#x3D;true&#x60; - &#x60;holiday_subdivision&#x60; also requires &#x60;holiday_country&#x60; Examples: - Selector-current instant: &#x60;/v1/time/diff?from&#x3D;unix&#x3D;1711300000&amp;to&#x3D;tz&#x3D;America/New_York&#x60; - Wall-clock pairing: &#x60;/v1/time/diff?from&#x3D;iso&#x3D;2026-04-16T09:00:00&amp;from_tz&#x3D;America/New_York&amp;to&#x3D;iso&#x3D;2026-04-16T09:00:00&amp;to_tz&#x3D;Europe/London&#x60; - Wall-clock via selector: &#x60;/v1/time/diff?from&#x3D;iso&#x3D;2026-01-01T12:00:00&amp;from_ip&#x3D;8.8.8.8&amp;to&#x3D;iso&#x3D;2026-01-01T12:00:00&amp;to_offset&#x3D;-05:00&#x60;
369
+ # Computes the duration between &#x60;from&#x60; and &#x60;to&#x60;. Required query fields: &#x60;from&#x60; and &#x60;to&#x60; only. Do not send every optional companion field. For each side, choose one supported specifier form. A &#x60;from_*&#x60; or &#x60;to_*&#x60; companion is allowed only when that side uses &#x60;iso&#x3D;...&#x60; with no explicit offset; use at most one companion selector, except that coordinate input requires its paired latitude and longitude. &#x60;from&#x60; and &#x60;to&#x60; are embedded specifier strings. Accepted specifier forms: - &#x60;from&#x3D;now&#x60; - &#x60;from&#x3D;unix&#x3D;1711300000&#x60; - &#x60;from&#x3D;unix_ms&#x3D;1711300000000&#x60; - &#x60;from&#x3D;iso&#x3D;2026-04-16T09:00:00&#x60; - &#x60;from&#x3D;tz&#x3D;America/New_York&#x60; - &#x60;from&#x3D;ip&#x3D;8.8.8.8&#x60; - &#x60;from&#x3D;offset&#x3D;-05:00&#x60; - the same forms are accepted for &#x60;to&#x60; Timezone hint pairings: - &#x60;from_tz&#x60; only with &#x60;from&#x3D;iso&#x3D;...&#x60; that has no explicit offset - &#x60;from_ip&#x60;, &#x60;from_lat&#x60;/&#x60;from_lon&#x60;, and &#x60;from_offset&#x60; only with &#x60;from&#x3D;iso&#x3D;...&#x60; that has no explicit offset - &#x60;to_tz&#x60; only with &#x60;to&#x3D;iso&#x3D;...&#x60; that has no explicit offset - &#x60;to_ip&#x60;, &#x60;to_lat&#x60;/&#x60;to_lon&#x60;, and &#x60;to_offset&#x60; only with &#x60;to&#x3D;iso&#x3D;...&#x60; that has no explicit offset Selector semantics: - &#x60;tz&#x3D;...&#x60;, &#x60;ip&#x3D;...&#x60;, and &#x60;offset&#x3D;...&#x60; inside &#x60;from&#x60; or &#x60;to&#x60; 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 &#x60;direction&#x60; to see whether &#x60;to&#x60; is after, before, or the same instant as &#x60;from&#x60; - because \&quot;now\&quot; is the same instant in every zone, &#x60;tz&#x3D;&#x60;, &#x60;ip&#x3D;&#x60; and &#x60;offset&#x3D;&#x60; specifiers never change &#x60;seconds&#x60; or &#x60;direction&#x60;; their zone only picks the calendar date for business days - coordinates are not a specifier (&#x60;from&#x3D;lat&#x3D;...&#x60; returns \&quot;Unsupported time specifier.\&quot;); use &#x60;from_lat&#x60;/&#x60;from_lon&#x60; as a hint for a local &#x60;iso&#x60; - &#x60;seconds&#x60;, &#x60;minutes&#x60;, &#x60;hours&#x60;, &#x60;days&#x60; and the &#x60;format&#x60; placeholders are totals in each unit, not remainders; &#x60;human&#x60; is always written in hours, minutes and seconds Business-day rules: - &#x60;holiday_country&#x60; and &#x60;holiday_subdivision&#x60; require &#x60;business_days&#x3D;true&#x60; - &#x60;holiday_subdivision&#x60; also requires &#x60;holiday_country&#x60; - days are counted by calendar date, start included and end excluded, unsigned - each side&#39;s date is taken in its zone when known (a &#x60;from_*&#x60;/&#x60;to_*&#x60; hint, or a &#x60;tz&#x3D;&#x60;/&#x60;ip&#x3D;&#x60;/&#x60;offset&#x3D;&#x60; specifier), otherwise in UTC - example: &#x60;from&#x3D;iso&#x3D;2026-01-02T00:00:00Z&amp;to&#x3D;iso&#x3D;2026-04-30T00:00:00Z&amp;business_days&#x3D;true&amp;holiday_country&#x3D;FR&#x60; returns &#x60;business_days: 83&#x60; - weekends follow the holiday calendar&#39;s country (Friday/Saturday for &#x60;SA&#x60;); a subdivision uses its country&#39;s weekend - example with a subdivision: &#x60;from&#x3D;iso&#x3D;2026-01-02T00:00:00Z&amp;to&#x3D;iso&#x3D;2026-04-30T00:00:00Z&amp;business_days&#x3D;true&amp;holiday_country&#x3D;CH&amp;holiday_subdivision&#x3D;ZH&#x60; returns &#x60;business_days: 82&#x60; (&#x60;holiday_country&#x3D;CH-ZH&#x60; is the same calendar) - example with a Friday/Saturday weekend: the same range with &#x60;holiday_country&#x3D;SA&#x60; returns &#x60;business_days: 79&#x60; Examples: - Selector-current instant: &#x60;/v1/time/diff?from&#x3D;unix&#x3D;1711300000&amp;to&#x3D;now&#x60; - Wall-clock pairing: &#x60;/v1/time/diff?from&#x3D;iso&#x3D;2026-04-16T09:00:00&amp;from_tz&#x3D;America/New_York&amp;to&#x3D;iso&#x3D;2026-04-16T09:00:00&amp;to_tz&#x3D;Europe/London&#x60; - Wall-clock via selector: &#x60;/v1/time/diff?from&#x3D;iso&#x3D;2026-01-01T12:00:00&amp;from_ip&#x3D;8.8.8.8&amp;to&#x3D;iso&#x3D;2026-01-01T12:00:00&amp;to_offset&#x3D;-05:00&#x60;
370
370
  # @param from [String] Time specifier. Supported forms are &#x60;now&#x60;, &#x60;unix&#x3D;&lt;seconds&gt;&#x60;, &#x60;unix_ms&#x3D;&lt;milliseconds&gt;&#x60;, &#x60;iso&#x3D;&lt;ISO-8601&gt;&#x60;, &#x60;offset&#x3D;±HH:MM&#x60;, &#x60;tz&#x3D;&lt;IANA timezone&gt;&#x60;, and &#x60;ip&#x3D;&lt;IP address&gt;&#x60;. For &#x60;tz&#x3D;...&#x60;, &#x60;ip&#x3D;...&#x60;, and &#x60;offset&#x3D;...&#x60;, the specifier means the current request-time instant resolved through that selector. To express a local wall-clock time, use &#x60;from&#x3D;iso&#x3D;...&#x60; together with one of &#x60;from_tz&#x60;, &#x60;from_ip&#x60;, &#x60;from_lat&#x60;+&#x60;from_lon&#x60;, or &#x60;from_offset&#x60;.
371
371
  # @param to [String] Time specifier. Supported forms are &#x60;now&#x60;, &#x60;unix&#x3D;&lt;seconds&gt;&#x60;, &#x60;unix_ms&#x3D;&lt;milliseconds&gt;&#x60;, &#x60;iso&#x3D;&lt;ISO-8601&gt;&#x60;, &#x60;offset&#x3D;±HH:MM&#x60;, &#x60;tz&#x3D;&lt;IANA timezone&gt;&#x60;, and &#x60;ip&#x3D;&lt;IP address&gt;&#x60;. For &#x60;tz&#x3D;...&#x60;, &#x60;ip&#x3D;...&#x60;, and &#x60;offset&#x3D;...&#x60;, the specifier means the current request-time instant resolved through that selector. To express a local wall-clock time, use &#x60;to&#x3D;iso&#x3D;...&#x60; together with one of &#x60;to_tz&#x60;, &#x60;to_ip&#x60;, &#x60;to_lat&#x60;+&#x60;to_lon&#x60;, or &#x60;to_offset&#x60;.
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 &#x60;to&#x3D;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;to_lon&#x60; to resolve that local wall-clock time through the timezone mapped from these coordinates.
381
381
  # @option opts [Float] :to_lon Used only with &#x60;to&#x3D;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;to_lat&#x60;.
382
382
  # @option opts [String] :to_offset Used only with &#x60;to&#x3D;iso&#x3D;...&#x60; 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 &#x60;%days&#x60;, &#x60;%hours&#x60;, &#x60;%minutes&#x60;, and &#x60;%seconds&#x60;.
384
- # @option opts [Boolean] :business_days Set to &#x60;true&#x60; to enable weekday/business-day counting.
385
- # @option opts [String] :holiday_country ISO 3166-1 alpha-2 holiday calendar country code. Requires &#x60;business_days&#x3D;true&#x60;.
386
- # @option opts [String] :holiday_subdivision Holiday calendar subdivision code from the upstream &#x60;python-holidays&#x60; calendar, for example &#x60;CA&#x60; or &#x60;ENG&#x60;. Requires &#x60;holiday_country&#x60; and &#x60;business_days&#x3D;true&#x60;.
387
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
383
+ # @option opts [String] :format Custom duration format template using &#x60;%days&#x60;, &#x60;%hours&#x60;, &#x60;%minutes&#x60;, and &#x60;%seconds&#x60;. Each placeholder is the total duration in that unit, not a remainder (118 days renders &#x60;%days days %hours hours&#x60; as &#x60;118 days 2832 hours&#x60;).
384
+ # @option opts [Boolean] :business_days Set to &#x60;true&#x60; to add a &#x60;business_days&#x60; count. Days are counted by calendar date, start included and end excluded, unsigned; weekends follow the holiday calendar&#39;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 &#x60;holiday_country&#x60; is given) and holidays of the chosen calendar are skipped. Each endpoint&#39;s date is taken in its own zone when one is known (diff - from_*/to_* hints or a tz&#x3D;/ip&#x3D;/offset&#x3D; specifier; elapsed - source_*/compare_source_*), otherwise in UTC. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (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 &#x60;CH-ZH&#x60;, &#x60;US-CA&#x60; or &#x60;FR-6AE&#x60;. Requires &#x60;business_days&#x3D;true&#x60;. 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 &#x60;LK&#x60;) returns 400 INVALID_PARAMETER \&quot;Unsupported holiday calendar.\&quot;; a malformed value returns \&quot;Invalid holiday_country parameter.\&quot;; a business-day range outside 1900-2100 returns \&quot;Holiday calendar coverage is only available for years 1900-2100.\&quot;
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 &#x60;ENG&#x60; (GB), &#x60;ZH&#x60; (CH), &#x60;MH&#x60; (IN), &#x60;01&#x60; (FI) or &#x60;6AE&#x60; (FR); digits and leading zeros are part of the code. Subdivisions exist for 35 countries. Requires &#x60;holiday_country&#x60; and &#x60;business_days&#x3D;true&#x60;. An unknown code returns 400 INVALID_PARAMETER \&quot;Unknown holiday_subdivision &#39;XX&#39; for country DE.\&quot; (also for &#x60;FI&#x60; + &#x60;1&#x60;, which must be &#x60;01&#x60;); a value that conflicts with a combined &#x60;holiday_country&#x60; such as &#x60;US-CA&#x60; returns 400 INVALID_PARAMETER.
387
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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-Z]{2}$/)
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;; without a hint a local value is read as UTC. Accepted shapes are extended format with &#x60;Z&#x60;, &#x60;±HH:MM&#x60; or &#x60;±HH:MM:SS&#x60; (for example &#x60;1900-06-01T12:09:21+00:09:21&#x60;, as &#x60;iso_local&#x60; prints old local-mean-time offsets), optional fractional seconds, a space instead of &#x60;T&#x60;, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (&#x60;2027-02-29&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset.
512
517
  # @option opts [String] :source_ip Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lon&#x60; to resolve that local wall-clock time through the timezone mapped from these coordinates.
514
519
  # @option opts [Float] :source_lon Used only with &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lat&#x60;.
515
520
  # @option opts [String] :source_offset Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
519
524
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
520
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
521
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
522
- # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Reference: [strftime](https://strftime.net/).
523
- # @option opts [Boolean] :week
524
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
525
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
527
+ # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Supported directives: &#x60;%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 %%&#x60;, with the &#x60;-&#x60;, &#x60;_&#x60; and &#x60;0&#x60; padding flags on numeric directives. &#x60;%Z&#x60; prints the IANA zone name (or &#x60;UTC+HH:MM&#x60; for an offset target, &#x60;UTC&#x60; with no target), not an abbreviation. Any other directive (for example &#x60;%U&#x60;, &#x60;%f&#x60;, &#x60;%Q&#x60;) or a trailing &#x60;%&#x60; returns 400 INVALID_PARAMETER naming the directive.
528
+ # @option opts [Boolean] :week Set to &#x60;true&#x60; to add the ISO 8601 &#x60;week_number&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
529
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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: - &#x60;unix&#x3D;1711300000&#x60; - &#x60;unix_ms&#x3D;1711300000000&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00Z&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_ip&#x3D;8.8.8.8&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_lat&#x3D;40.7128&amp;source_lon&#x3D;-74.0060&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_offset&#x3D;-05:00&#x60; - if no input timestamp is provided, the request time is used Target selector forms: - &#x60;tz&#x3D;America/New_York&#x60; - &#x60;ip&#x3D;8.8.8.8&#x60; - &#x60;lat&#x3D;40.7128&amp;lon&#x3D;-74.0060&#x60; - &#x60;offset&#x3D;-04:00&#x60; - &#x60;auto_tz&#x3D;true&#x60; Additional flags: - &#x60;week&#x3D;true&#x60; adds &#x60;week_number&#x60; Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of &#x60;source_tz&#x60;, &#x60;source_ip&#x60;, &#x60;source_lat&#x60;/&#x60;source_lon&#x60;, or &#x60;source_offset&#x60; - local-ISO companion selectors are valid only with &#x60;iso&#x3D;...&#x60; that has no explicit offset - bulk is not supported on this route Examples: - &#x60;/v1/time/calendar?iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&amp;tz&#x3D;Europe/London&amp;week&#x3D;true&#x60; - &#x60;/v1/time/calendar?unix&#x3D;1711300000&amp;auto_tz&#x3D;true&#x60;
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;; without a hint a local value is read as UTC. Accepted shapes are extended format with &#x60;Z&#x60;, &#x60;±HH:MM&#x60; or &#x60;±HH:MM:SS&#x60; (for example &#x60;1900-06-01T12:09:21+00:09:21&#x60;, as &#x60;iso_local&#x60; prints old local-mean-time offsets), optional fractional seconds, a space instead of &#x60;T&#x60;, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (&#x60;2027-02-29&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset.
538
543
  # @option opts [String] :source_ip Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lon&#x60; to resolve that local wall-clock time through the timezone mapped from these coordinates.
540
545
  # @option opts [Float] :source_lon Used only with &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lat&#x60;.
541
546
  # @option opts [String] :source_offset Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
545
550
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
546
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
547
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
548
- # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Reference: [strftime](https://strftime.net/).
549
- # @option opts [Boolean] :week
550
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
551
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
553
+ # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Supported directives: &#x60;%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 %%&#x60;, with the &#x60;-&#x60;, &#x60;_&#x60; and &#x60;0&#x60; padding flags on numeric directives. &#x60;%Z&#x60; prints the IANA zone name (or &#x60;UTC+HH:MM&#x60; for an offset target, &#x60;UTC&#x60; with no target), not an abbreviation. Any other directive (for example &#x60;%U&#x60;, &#x60;%f&#x60;, &#x60;%Q&#x60;) or a trailing &#x60;%&#x60; returns 400 INVALID_PARAMETER naming the directive.
554
+ # @option opts [Boolean] :week Set to &#x60;true&#x60; to add the ISO 8601 &#x60;week_number&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
555
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;; without a hint a local value is read as UTC. Accepted shapes are extended format with &#x60;Z&#x60;, &#x60;±HH:MM&#x60; or &#x60;±HH:MM:SS&#x60; (for example &#x60;1900-06-01T12:09:21+00:09:21&#x60;, as &#x60;iso_local&#x60; prints old local-mean-time offsets), optional fractional seconds, a space instead of &#x60;T&#x60;, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (&#x60;2027-02-29&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset.
667
672
  # @option opts [String] :source_ip Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lon&#x60; to resolve that local wall-clock time through the timezone mapped from these coordinates.
669
674
  # @option opts [Float] :source_lon Used only with &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lat&#x60;.
670
675
  # @option opts [String] :source_offset Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
674
679
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
675
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
676
- # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Reference: [strftime](https://strftime.net/).
680
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Supported directives: &#x60;%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 %%&#x60;, with the &#x60;-&#x60;, &#x60;_&#x60; and &#x60;0&#x60; padding flags on numeric directives. &#x60;%Z&#x60; prints the IANA zone name (or &#x60;UTC+HH:MM&#x60; for an offset target, &#x60;UTC&#x60; with no target), not an abbreviation. Any other directive (for example &#x60;%U&#x60;, &#x60;%f&#x60;, &#x60;%Q&#x60;) or a trailing &#x60;%&#x60; 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: - &#x60;unix&#x3D;1711300000&#x60; - &#x60;unix_ms&#x3D;1711300000000&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00Z&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&#x60; Target selector forms: - &#x60;tz&#x3D;America/New_York&#x60; - &#x60;ip&#x3D;8.8.8.8&#x60; - &#x60;lat&#x3D;40.7128&amp;lon&#x3D;-74.0060&#x60; - &#x60;offset&#x3D;-04:00&#x60; Incompatible combinations: - &#x60;style&#x60; is required and must be one of the 30 names in the &#x60;style&#x60; enum - at most one input timestamp form - at most one target selector family - use at most one of &#x60;source_tz&#x60;, &#x60;source_ip&#x60;, &#x60;source_lat&#x60;/&#x60;source_lon&#x60;, or &#x60;source_offset&#x60; - local-ISO companion selectors are valid only with &#x60;iso&#x3D;...&#x60; that has no explicit offset - this route is single-target only; comma-separated &#x60;tz&#x60;, &#x60;ip&#x60;, and &#x60;offset&#x60; values are rejected - &#x60;auto_tz&#x60; is not supported on this route - &#x60;sign&#x60; is not supported on this route Examples: - Digital: &#x60;/v1/time/clock?style&#x3D;digital-dashboard&amp;iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&amp;tz&#x3D;Europe/London&#x60; - Analog: &#x60;/v1/time/clock?style&#x3D;analog-station&amp;offset&#x3D;-04:00&#x60;
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;; without a hint a local value is read as UTC. Accepted shapes are extended format with &#x60;Z&#x60;, &#x60;±HH:MM&#x60; or &#x60;±HH:MM:SS&#x60; (for example &#x60;1900-06-01T12:09:21+00:09:21&#x60;, as &#x60;iso_local&#x60; prints old local-mean-time offsets), optional fractional seconds, a space instead of &#x60;T&#x60;, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (&#x60;2027-02-29&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset.
691
696
  # @option opts [String] :source_ip Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lon&#x60; to resolve that local wall-clock time through the timezone mapped from these coordinates.
693
698
  # @option opts [Float] :source_lon Used only with &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lat&#x60;.
694
699
  # @option opts [String] :source_offset Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
698
703
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
699
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
700
- # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Reference: [strftime](https://strftime.net/).
704
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Supported directives: &#x60;%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 %%&#x60;, with the &#x60;-&#x60;, &#x60;_&#x60; and &#x60;0&#x60; padding flags on numeric directives. &#x60;%Z&#x60; prints the IANA zone name (or &#x60;UTC+HH:MM&#x60; for an offset target, &#x60;UTC&#x60; with no target), not an abbreviation. Any other directive (for example &#x60;%U&#x60;, &#x60;%f&#x60;, &#x60;%Q&#x60;) or a trailing &#x60;%&#x60; 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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
822
827
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
823
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
824
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
825
- # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Reference: [strftime](https://strftime.net/).
826
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
828
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
830
+ # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Supported directives: &#x60;%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 %%&#x60;, with the &#x60;-&#x60;, &#x60;_&#x60; and &#x60;0&#x60; padding flags on numeric directives. &#x60;%Z&#x60; prints the IANA zone name (or &#x60;UTC+HH:MM&#x60; for an offset target, &#x60;UTC&#x60; with no target), not an abbreviation. Any other directive (for example &#x60;%U&#x60;, &#x60;%f&#x60;, &#x60;%Q&#x60;) or a trailing &#x60;%&#x60; returns 400 INVALID_PARAMETER naming the directive.
831
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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 &#x60;tz&#x60;, &#x60;ip&#x60;, or &#x60;offset&#x60; is supplied as a comma-separated list. Target selector rules: - Use at most one selector family per request: &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60; + &#x60;lon&#x60;, &#x60;offset&#x60;, or &#x60;auto_tz&#x3D;true&#x60;. - If no selector is provided, the response defaults to UTC with &#x60;timezone&#x3D;null&#x60; and &#x60;iso_local&#x3D;null&#x60;. - Bulk mode is available only through one comma-separated &#x60;tz&#x60;, &#x60;ip&#x60;, or &#x60;offset&#x60; selector and cannot be combined with any other selector. Example: - Single target: &#x60;/v1/time/current?tz&#x3D;America/New_York&#x60; - For bulk, provide one comma-separated &#x60;tz&#x60;, &#x60;ip&#x60;, or &#x60;offset&#x60; value, for example &#x60;/v1/time/current?tz&#x3D;America/New_York,Europe/London,Asia/Tokyo&#x60;.
839
+ # Returns current time data for a single target, or a bulk array when exactly one of &#x60;tz&#x60;, &#x60;ip&#x60;, or &#x60;offset&#x60; is supplied as a comma-separated list. Target selector rules: - Use at most one selector family per request: &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60; + &#x60;lon&#x60;, &#x60;offset&#x60;, or &#x60;auto_tz&#x3D;true&#x60;. - If no selector is provided, the response defaults to UTC with &#x60;timezone&#x3D;null&#x60; and &#x60;iso_local&#x3D;null&#x60;. - Bulk mode is available only through one comma-separated &#x60;tz&#x60;, &#x60;ip&#x60;, or &#x60;offset&#x60; selector, accepts at most 10 values, and cannot be combined with any other selector. Example: - Single target: &#x60;/v1/time/current?tz&#x3D;America/New_York&#x60; - For bulk, provide one comma-separated &#x60;tz&#x60;, &#x60;ip&#x60;, or &#x60;offset&#x60; value, for example &#x60;/v1/time/current?tz&#x3D;America/New_York,Europe/London,Asia/Tokyo&#x60;.
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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
839
844
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
840
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
841
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
842
- # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Reference: [strftime](https://strftime.net/).
843
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
845
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
847
+ # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Supported directives: &#x60;%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 %%&#x60;, with the &#x60;-&#x60;, &#x60;_&#x60; and &#x60;0&#x60; padding flags on numeric directives. &#x60;%Z&#x60; prints the IANA zone name (or &#x60;UTC+HH:MM&#x60; for an offset target, &#x60;UTC&#x60; with no target), not an abbreviation. Any other directive (for example &#x60;%U&#x60;, &#x60;%f&#x60;, &#x60;%Q&#x60;) or a trailing &#x60;%&#x60; returns 400 INVALID_PARAMETER naming the directive.
848
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
928
933
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
929
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
930
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
931
- # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Reference: [strftime](https://strftime.net/).
932
- # @option opts [Boolean] :_next
933
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
934
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
936
+ # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Supported directives: &#x60;%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 %%&#x60;, with the &#x60;-&#x60;, &#x60;_&#x60; and &#x60;0&#x60; padding flags on numeric directives. &#x60;%Z&#x60; prints the IANA zone name (or &#x60;UTC+HH:MM&#x60; for an offset target, &#x60;UTC&#x60; with no target), not an abbreviation. Any other directive (for example &#x60;%U&#x60;, &#x60;%f&#x60;, &#x60;%Q&#x60;) or a trailing &#x60;%&#x60; returns 400 INVALID_PARAMETER naming the directive.
937
+ # @option opts [Boolean] :_next Set to &#x60;true&#x60; to add &#x60;next_transition&#x60; (the next UTC offset change, or null). Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
938
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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: &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60; + &#x60;lon&#x60;, &#x60;offset&#x60;, or &#x60;auto_tz&#x3D;true&#x60;. - If no selector is provided, the response defaults to UTC. - Bulk is not supported on this route. - &#x60;next&#x3D;true&#x60; adds &#x60;next_transition&#x60; when the resolver provides a transition timestamp. Example: - &#x60;/v1/time/dst?tz&#x3D;America/New_York&amp;next&#x3D;true&#x60;
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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
946
951
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
947
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
948
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
949
- # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Reference: [strftime](https://strftime.net/).
950
- # @option opts [Boolean] :_next
951
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
952
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
954
+ # @option opts [String] :format Custom date/time format template using supported &#x60;strftime&#x60;-style directives such as &#x60;%Y-%m-%d %H:%M:%S&#x60;. Supported directives: &#x60;%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 %%&#x60;, with the &#x60;-&#x60;, &#x60;_&#x60; and &#x60;0&#x60; padding flags on numeric directives. &#x60;%Z&#x60; prints the IANA zone name (or &#x60;UTC+HH:MM&#x60; for an offset target, &#x60;UTC&#x60; with no target), not an abbreviation. Any other directive (for example &#x60;%U&#x60;, &#x60;%f&#x60;, &#x60;%Q&#x60;) or a trailing &#x60;%&#x60; returns 400 INVALID_PARAMETER naming the directive.
955
+ # @option opts [Boolean] :_next Set to &#x60;true&#x60; to add &#x60;next_transition&#x60; (the next UTC offset change, or null). Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
956
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;; without a hint a local value is read as UTC. Accepted shapes are extended format with &#x60;Z&#x60;, &#x60;±HH:MM&#x60; or &#x60;±HH:MM:SS&#x60; (for example &#x60;1900-06-01T12:09:21+00:09:21&#x60;, as &#x60;iso_local&#x60; prints old local-mean-time offsets), optional fractional seconds, a space instead of &#x60;T&#x60;, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (&#x60;2027-02-29&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset.
1038
1043
  # @option opts [String] :source_ip Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lon&#x60; 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 &#x60;compare_iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;compare_source_lon&#x60; 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 &#x60;compare_iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;compare_source_lat&#x60;.
1049
1054
  # @option opts [String] :compare_source_offset Used only with &#x60;compare_iso&#x3D;...&#x60; 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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
1053
1058
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
1054
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
1055
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
1056
- # @option opts [String] :format Custom duration format template using &#x60;%days&#x60;, &#x60;%hours&#x60;, &#x60;%minutes&#x60;, and &#x60;%seconds&#x60;.
1057
- # @option opts [Boolean] :business_days Set to &#x60;true&#x60; to enable weekday/business-day counting.
1058
- # @option opts [String] :holiday_country ISO 3166-1 alpha-2 holiday calendar country code. Requires &#x60;business_days&#x3D;true&#x60;.
1059
- # @option opts [String] :holiday_subdivision Holiday calendar subdivision code from the upstream &#x60;python-holidays&#x60; calendar, for example &#x60;CA&#x60; or &#x60;ENG&#x60;. Requires &#x60;holiday_country&#x60; and &#x60;business_days&#x3D;true&#x60;.
1060
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
1059
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
1061
+ # @option opts [String] :format Custom duration format template using &#x60;%days&#x60;, &#x60;%hours&#x60;, &#x60;%minutes&#x60;, and &#x60;%seconds&#x60;. Each placeholder is the total duration in that unit, not a remainder (118 days renders &#x60;%days days %hours hours&#x60; as &#x60;118 days 2832 hours&#x60;).
1062
+ # @option opts [Boolean] :business_days Set to &#x60;true&#x60; to add a &#x60;business_days&#x60; count. Days are counted by calendar date, start included and end excluded, unsigned; weekends follow the holiday calendar&#39;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 &#x60;holiday_country&#x60; is given) and holidays of the chosen calendar are skipped. Each endpoint&#39;s date is taken in its own zone when one is known (diff - from_*/to_* hints or a tz&#x3D;/ip&#x3D;/offset&#x3D; specifier; elapsed - source_*/compare_source_*), otherwise in UTC. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (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 &#x60;CH-ZH&#x60;, &#x60;US-CA&#x60; or &#x60;FR-6AE&#x60;. Requires &#x60;business_days&#x3D;true&#x60;. 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 &#x60;LK&#x60;) returns 400 INVALID_PARAMETER \&quot;Unsupported holiday calendar.\&quot;; a malformed value returns \&quot;Invalid holiday_country parameter.\&quot;; a business-day range outside 1900-2100 returns \&quot;Holiday calendar coverage is only available for years 1900-2100.\&quot;
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 &#x60;ENG&#x60; (GB), &#x60;ZH&#x60; (CH), &#x60;MH&#x60; (IN), &#x60;01&#x60; (FI) or &#x60;6AE&#x60; (FR); digits and leading zeros are part of the code. Subdivisions exist for 35 countries. Requires &#x60;holiday_country&#x60; and &#x60;business_days&#x3D;true&#x60;. An unknown code returns 400 INVALID_PARAMETER \&quot;Unknown holiday_subdivision &#39;XX&#39; for country DE.\&quot; (also for &#x60;FI&#x60; + &#x60;1&#x60;, which must be &#x60;01&#x60;); a value that conflicts with a combined &#x60;holiday_country&#x60; such as &#x60;US-CA&#x60; returns 400 INVALID_PARAMETER.
1065
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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: - &#x60;unix&#x3D;1711300000&#x60; - &#x60;unix_ms&#x3D;1711300000000&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00Z&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_ip&#x3D;8.8.8.8&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_lat&#x3D;40.7128&amp;source_lon&#x3D;-74.0060&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_offset&#x3D;-05:00&#x60; Compare timestamp forms: - &#x60;compare_unix&#x3D;1711213600&#x60; - &#x60;compare_unix_ms&#x3D;1711213600000&#x60; - &#x60;compare_iso&#x3D;2026-04-16T09:00:00Z&#x60; - &#x60;compare_iso&#x3D;2026-04-16T09:00:00&amp;compare_source_tz&#x3D;Europe/London&#x60; - &#x60;compare_iso&#x3D;2026-04-16T09:00:00&amp;compare_source_ip&#x3D;8.8.8.8&#x60; - &#x60;compare_iso&#x3D;2026-04-16T09:00:00&amp;compare_source_lat&#x3D;40.7128&amp;compare_source_lon&#x3D;-74.0060&#x60; - &#x60;compare_iso&#x3D;2026-04-16T09:00:00&amp;compare_source_offset&#x3D;-05:00&#x60; Compare selector forms: - &#x60;tz&#x3D;America/New_York&#x60; - &#x60;ip&#x3D;8.8.8.8&#x60; - &#x60;lat&#x3D;40.7128&amp;lon&#x3D;-74.0060&#x60; - &#x60;offset&#x3D;-04:00&#x60; - &#x60;auto_tz&#x3D;true&#x60; 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 &#x60;source_tz&#x60;, &#x60;source_ip&#x60;, &#x60;source_lat&#x60;/&#x60;source_lon&#x60;, or &#x60;source_offset&#x60; - use at most one of &#x60;compare_source_tz&#x60;, &#x60;compare_source_ip&#x60;, &#x60;compare_source_lat&#x60;/&#x60;compare_source_lon&#x60;, or &#x60;compare_source_offset&#x60; - local-ISO companion selectors are valid only with &#x60;iso&#x3D;...&#x60; that has no explicit offset - compare local-ISO companion selectors are valid only with &#x60;compare_iso&#x3D;...&#x60; that has no explicit offset - if no compare input is provided, the comparison defaults to the request time Business-day rules: - &#x60;holiday_country&#x60; and &#x60;holiday_subdivision&#x60; require &#x60;business_days&#x3D;true&#x60; - &#x60;holiday_subdivision&#x60; also requires &#x60;holiday_country&#x60; Examples: - Timestamp-to-timestamp: &#x60;/v1/time/elapsed?iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&amp;compare_iso&#x3D;2026-04-16T09:00:00&amp;compare_source_tz&#x3D;Europe/London&#x60; - Timestamp-to-selector: &#x60;/v1/time/elapsed?unix&#x3D;1711300000&amp;tz&#x3D;America/New_York&amp;business_days&#x3D;true&#x60;
1073
+ # Computes elapsed or remaining duration relative to one required reference timestamp. Reference timestamp forms: - &#x60;unix&#x3D;1711300000&#x60; - &#x60;unix_ms&#x3D;1711300000000&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00Z&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_ip&#x3D;8.8.8.8&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_lat&#x3D;40.7128&amp;source_lon&#x3D;-74.0060&#x60; - &#x60;iso&#x3D;2026-04-16T09:00:00&amp;source_offset&#x3D;-05:00&#x60; Compare timestamp forms: - &#x60;compare_unix&#x3D;1711213600&#x60; - &#x60;compare_unix_ms&#x3D;1711213600000&#x60; - &#x60;compare_iso&#x3D;2026-04-16T09:00:00Z&#x60; - &#x60;compare_iso&#x3D;2026-04-16T09:00:00&amp;compare_source_tz&#x3D;Europe/London&#x60; - &#x60;compare_iso&#x3D;2026-04-16T09:00:00&amp;compare_source_ip&#x3D;8.8.8.8&#x60; - &#x60;compare_iso&#x3D;2026-04-16T09:00:00&amp;compare_source_lat&#x3D;40.7128&amp;compare_source_lon&#x3D;-74.0060&#x60; - &#x60;compare_iso&#x3D;2026-04-16T09:00:00&amp;compare_source_offset&#x3D;-05:00&#x60; Compare selector forms: - &#x60;tz&#x3D;America/New_York&#x60; - &#x60;ip&#x3D;8.8.8.8&#x60; - &#x60;lat&#x3D;40.7128&amp;lon&#x3D;-74.0060&#x60; - &#x60;offset&#x3D;-04:00&#x60; - &#x60;auto_tz&#x3D;true&#x60; 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 &#x60;source_tz&#x60;, &#x60;source_ip&#x60;, &#x60;source_lat&#x60;/&#x60;source_lon&#x60;, or &#x60;source_offset&#x60; - use at most one of &#x60;compare_source_tz&#x60;, &#x60;compare_source_ip&#x60;, &#x60;compare_source_lat&#x60;/&#x60;compare_source_lon&#x60;, or &#x60;compare_source_offset&#x60; - local-ISO companion selectors are valid only with &#x60;iso&#x3D;...&#x60; that has no explicit offset - compare local-ISO companion selectors are valid only with &#x60;compare_iso&#x3D;...&#x60; that has no explicit offset - if no compare input is provided, the comparison defaults to the request time - compare selectors (&#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60;, &#x60;offset&#x60;, &#x60;auto_tz&#x60;) all mean the current request time, which is the same instant in every zone, so they do not change the result - equal instants return &#x60;seconds: 0&#x60; with &#x60;direction: passed&#x60; (diff returns &#x60;same&#x60;) Business-day rules: - &#x60;holiday_country&#x60; and &#x60;holiday_subdivision&#x60; require &#x60;business_days&#x3D;true&#x60; - &#x60;holiday_subdivision&#x60; also requires &#x60;holiday_country&#x60; - same counting rules as diff; the reference date uses its &#x60;source_*&#x60; zone and the compare date its &#x60;compare_source_*&#x60; zone when given, otherwise UTC - weekends follow the holiday calendar&#39;s country (Friday/Saturday for &#x60;SA&#x60;); a subdivision uses its country&#39;s weekend - example with a subdivision: &#x60;iso&#x3D;2026-01-02T00:00:00Z&amp;compare_iso&#x3D;2026-04-30T00:00:00Z&amp;business_days&#x3D;true&amp;holiday_country&#x3D;IN-MH&#x60; returns &#x60;business_days: 76&#x60; - example with a Friday/Saturday weekend: the same range with &#x60;holiday_country&#x3D;SA&#x60; returns &#x60;business_days: 79&#x60; Examples: - Timestamp-to-timestamp: &#x60;/v1/time/elapsed?iso&#x3D;2026-04-16T09:00:00&amp;source_tz&#x3D;America/New_York&amp;compare_iso&#x3D;2026-04-16T09:00:00&amp;compare_source_tz&#x3D;Europe/London&#x60; - Timestamp-to-selector: &#x60;/v1/time/elapsed?unix&#x3D;1711300000&amp;tz&#x3D;America/New_York&amp;business_days&#x3D;true&#x60;
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;.
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 &#x60;source_tz&#x3D;Area/City&#x60;, &#x60;source_ip&#x3D;...&#x60;, &#x60;source_lat&#x3D;...&amp;source_lon&#x3D;...&#x60;, or &#x60;source_offset&#x3D;±HH:MM&#x60;; without a hint a local value is read as UTC. Accepted shapes are extended format with &#x60;Z&#x60;, &#x60;±HH:MM&#x60; or &#x60;±HH:MM:SS&#x60; (for example &#x60;1900-06-01T12:09:21+00:09:21&#x60;, as &#x60;iso_local&#x60; prints old local-mean-time offsets), optional fractional seconds, a space instead of &#x60;T&#x60;, a local time, or a date alone (read as 00:00). Basic format and offsets without a colon are rejected. The date must exist (&#x60;2027-02-29&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset.
1074
1079
  # @option opts [String] :source_ip Used only with &#x60;iso&#x3D;...&#x60; 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 &#x60;iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;source_lon&#x60; 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 &#x60;compare_iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;compare_source_lon&#x60; 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 &#x60;compare_iso&#x3D;...&#x60; when the ISO value has no explicit offset. Provide together with &#x60;compare_source_lat&#x60;.
1085
1090
  # @option opts [String] :compare_source_offset Used only with &#x60;compare_iso&#x3D;...&#x60; 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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
1089
1094
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
1090
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
1091
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
1092
- # @option opts [String] :format Custom duration format template using &#x60;%days&#x60;, &#x60;%hours&#x60;, &#x60;%minutes&#x60;, and &#x60;%seconds&#x60;.
1093
- # @option opts [Boolean] :business_days Set to &#x60;true&#x60; to enable weekday/business-day counting.
1094
- # @option opts [String] :holiday_country ISO 3166-1 alpha-2 holiday calendar country code. Requires &#x60;business_days&#x3D;true&#x60;.
1095
- # @option opts [String] :holiday_subdivision Holiday calendar subdivision code from the upstream &#x60;python-holidays&#x60; calendar, for example &#x60;CA&#x60; or &#x60;ENG&#x60;. Requires &#x60;holiday_country&#x60; and &#x60;business_days&#x3D;true&#x60;.
1096
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
1095
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
1097
+ # @option opts [String] :format Custom duration format template using &#x60;%days&#x60;, &#x60;%hours&#x60;, &#x60;%minutes&#x60;, and &#x60;%seconds&#x60;. Each placeholder is the total duration in that unit, not a remainder (118 days renders &#x60;%days days %hours hours&#x60; as &#x60;118 days 2832 hours&#x60;).
1098
+ # @option opts [Boolean] :business_days Set to &#x60;true&#x60; to add a &#x60;business_days&#x60; count. Days are counted by calendar date, start included and end excluded, unsigned; weekends follow the holiday calendar&#39;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 &#x60;holiday_country&#x60; is given) and holidays of the chosen calendar are skipped. Each endpoint&#39;s date is taken in its own zone when one is known (diff - from_*/to_* hints or a tz&#x3D;/ip&#x3D;/offset&#x3D; specifier; elapsed - source_*/compare_source_*), otherwise in UTC. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (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 &#x60;CH-ZH&#x60;, &#x60;US-CA&#x60; or &#x60;FR-6AE&#x60;. Requires &#x60;business_days&#x3D;true&#x60;. 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 &#x60;LK&#x60;) returns 400 INVALID_PARAMETER \&quot;Unsupported holiday calendar.\&quot;; a malformed value returns \&quot;Invalid holiday_country parameter.\&quot;; a business-day range outside 1900-2100 returns \&quot;Holiday calendar coverage is only available for years 1900-2100.\&quot;
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 &#x60;ENG&#x60; (GB), &#x60;ZH&#x60; (CH), &#x60;MH&#x60; (IN), &#x60;01&#x60; (FI) or &#x60;6AE&#x60; (FR); digits and leading zeros are part of the code. Subdivisions exist for 35 countries. Requires &#x60;holiday_country&#x60; and &#x60;business_days&#x3D;true&#x60;. An unknown code returns 400 INVALID_PARAMETER \&quot;Unknown holiday_subdivision &#39;XX&#39; for country DE.\&quot; (also for &#x60;FI&#x60; + &#x60;1&#x60;, which must be &#x60;01&#x60;); a value that conflicts with a combined &#x60;holiday_country&#x60; such as &#x60;US-CA&#x60; returns 400 INVALID_PARAMETER.
1101
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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-Z]{2}$/)
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 that includes `matching_zones` for the request-time offset match. Examples: - Single target: `/v1/timezone?tz=America/New_York` - Offset match: `/v1/timezone?offset=-04:00`
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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
1247
1257
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
1248
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
1249
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
1250
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
1258
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
1260
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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: &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60; + &#x60;lon&#x60;, &#x60;offset&#x60;, or &#x60;auto_tz&#x3D;true&#x60;. - Bulk is not supported on this route. - &#x60;offset&#x60; queries return a specialized payload that includes &#x60;matching_zones&#x60; for the request-time offset match. Examples: - Single target: &#x60;/v1/timezone?tz&#x3D;America/New_York&#x60; - Offset match: &#x60;/v1/timezone?offset&#x3D;-04:00&#x60;
1268
+ # Resolves timezone metadata for a single target. Target selector rules: - Use exactly one selector family: &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60; + &#x60;lon&#x60;, &#x60;offset&#x60;, or &#x60;auto_tz&#x3D;true&#x60;. - Bulk is not supported on this route. - With no selector the route returns 400 MISSING_TARGET. - &#x60;offset&#x60; queries return a specialized payload with &#x60;timezone&#x3D;null&#x60; and &#x60;matching_zones&#x60; for the request-time offset match. Only geographic zones are listed; &#x60;UTC&#x60; and &#x60;Etc/*&#x60; are intentionally excluded (use &#x60;tz&#x3D;UTC&#x60; for UTC). - &#x60;tz&#x60; names resolve to their canonical zone (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;). - An &#x60;ip&#x60; with no timezone mapping returns 404 NOT_FOUND. Examples: - Single target: &#x60;/v1/timezone?tz&#x3D;America/New_York&#x60; - Offset match: &#x60;/v1/timezone?offset&#x3D;-04:00&#x60;
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 &#x60;timezone&#x60; can differ (&#x60;Europe/Stockholm&#x60; returns &#x60;Europe/Berlin&#x60;, &#x60;UTC&#x60; returns &#x60;Etc/UTC&#x60;). &#x60;Etc/GMT+5&#x60; 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 &#x60;lon&#x60;.
1263
1273
  # @option opts [Float] :lon Longitude. Must be provided together with &#x60;lat&#x60;.
1264
- # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format. On bulk-capable routes, a comma-separated list enables bulk mode.
1265
- # @option opts [Boolean] :auto_tz Set to &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers.
1266
- # @option opts [Boolean] :sign Set to exactly &#x60;true&#x60; to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
1274
+ # @option opts [String] :offset Fixed UTC offset in &#x60;+HH:MM&#x60; or &#x60;-HH:MM&#x60; format only (&#x60;+0530&#x60; and &#x60;+5&#x60; are rejected); URL-encode &#x60;+&#x60; as &#x60;%2B&#x60;, since an unencoded &#x60;+&#x60; is read as a space. An offset target returns &#x60;timezone&#x3D;null&#x60;. 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 &#x60;true&#x60; to resolve using the caller IP from Cloudflare headers. Counts as a selector family, so it cannot be combined with &#x60;tz&#x60;, &#x60;ip&#x60;, &#x60;lat&#x60;/&#x60;lon&#x60; or &#x60;offset&#x60;. Not supported on &#x60;/v1/time/clock&#x60;. Enabled by &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive); any other value leaves it off without an error.
1276
+ # @option opts [Boolean] :sign Set to &#x60;true&#x60;, &#x60;1&#x60; or &#x60;yes&#x60; (case-insensitive) to ask the gateway to sign the final JSON response. Any other value, a bare &#x60;sign&#x60;, or repeated &#x60;sign&#x60; values leave the response unsigned. Every authenticated JSON response, including errors, then includes signing headers. Not supported on &#x60;/v1/time/clock&#x60;.
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