Search Results get_timezone




Overview

OKC_TIME_RES_PVT is a private (PVT) PL/SQL package body in the Oracle E-Business Suite Contracts (OKC) module. It provides the internal engine that resolves and persists time-related values against contract headers and contract lines within Oracle Time and Labor for Contracts (ETRM). The package translates the temporal attributes captured during contract authoring — span definitions, effectivity dates, and resolved time values — into their authoritative stored form in the OKC schema. It also handles the propagation of resolved time values to downstream tasks and their reconciliation across contract lifecycle events such as creation, extension, and termination. Because it is classified as a private package, it is not an official public API; it is invoked by sibling OKC packages and by the resolution batch processes rather than by external integrations. The search term "get_timezone" reflects the common requirement in ETRM implementations to derive the time zone context in which contract time values are interpreted, since resolved timevalues are sensitive to the operating time zone of the contract.

The package header comment (OKCCRESB.pls, version 120.2) indicates a long-standing, stable code line. The package uses AFLOG_ENABLED to conditionally emit debug output, consistent with Oracle Application Framework logging conventions.

Key Procedures and Functions

  • RES_TIME_EVENTS — Entry point that processes the resolution of time values in response to contract lifecycle events, coordinating the appropriate sub-process for the event type received.
  • RES_TIME_NEW_K — Resolves time values for a newly created contract header, establishing the initial set of resolved timevalues.
  • RES_TIME_EXTND_K — Handles time value resolution when an existing contract is extended, recalculating or appending resolved time values as effectivity changes.
  • RES_TIME_TERMNT_K — Manages time value resolution and cleanup when a contract is terminated.
  • CHECK_RES_TIME_N_TASKS — Validates the consistency between resolved time values and their associated tasks, returning status without side effects.
  • DELETE_RES_TIME_N_TASKS — Removes resolved time values and their linked task records, typically during termination or correction.
  • CREATE_RES_TIME_N_TASKS — Creates the task records that correspond to resolved time values, wiring the contract time model into the task framework.
  • BATCH_RESOLVE_TIME_N_TASKS — Batch driver that iterates across contracts to resolve time values and materialize associated tasks in volume.
  • TIME_RESOLVER — Core resolution routine that computes the effective time values from contract spans and time value definitions, and is the utility most closely associated with "get_timezone"-style lookups.

Tables Accessed

The package reads contract header and line effectivity from OKC_K_HEADERS_B and OKC_K_LINES_B, which supply the start and end dates used when resolving time. OKC_TIMEVALUES and OKC_RESOLVED_TIMEVALUES hold the definitional time values and their resolved counterparts respectively; the package writes resolved output to the latter. OKC_SPAN provides the span definitions that govern how time periods are bounded. JTF_TASKS_B is the task base table used by the CREATE, DELETE, CHECK, and BATCH task-related procedures, allowing resolved time values to be materialized as actionable tasks. PLITBLM is a PL/SQL index-by table type reference used for bulk collection handling during batch resolution.

Usage Notes

OKC_TIME_RES_PVT is invoked internally by the Contracts runtime whenever contract time attributes must be resolved — on contract save through the OKC API layer, during scheduled batch resolution runs, and on lifecycle transitions such as extension and termination. It is referenced by one other OKC package, confirming its role as a supporting internal component rather than a public entry point. Custom code should not call this package directly; integrations requiring time resolution should use the supported OKC public APIs, which in turn delegate to this package. Where implementations need time zone context for resolved timevalues, the time zone is normally sourced from profile or contract-level attributes and applied by the resolution routines here rather than returned by a standalone getter.