Search Results get_date_from_w_and_d




Overview

HZ_TIMEZONE_PUB is a public PL/SQL package in the APPS schema that centralizes timezone and daylight saving time (DST) resolution logic for the Oracle E-Business Suite Release 12.1.1 and 12.2.2 environment. As an API classified PUB, it exposes a stable, externally callable interface for converting between local and GMT times, resolving the timezone associated with a geographic location or phone number, and determining the correct begin and end dates and times for daylight saving transitions. The package body implements the public specification and delegates lower-level validation, message handling, and error propagation to the standard Oracle Application Object Library utilities FND_API, FND_MESSAGE, and FND_MSG_PUB. Because timezone data changes frequently with legislative and regional policy adjustments, HZ_TIMEZONE_PUB provides a single controlled access point so that forms, concurrent programs, and custom extensions do not each reinvent the conversion logic. The body is documented as VALID, and it is referenced by 51 other database objects, confirming its role as a foundational service within the Trading Community and shared application layers.

Key Procedures and Functions

The ETRM documentation identifies ten procedures and functions within the package body. GET_TIMEZONE_ID returns the internal identifier for a timezone given its descriptive or identifying attributes. GET_PHONE_TIMEZONE_ID resolves a timezone identifier from telephone information, using area and country code data. GET_TIMEZONE_GMT_DEVIATION returns the offset of a specified timezone relative to GMT. CONVERT_DATETIME translates a date and time value from one timezone context to another. GET_TIME and GET_TIME_AND_CODE retrieve the current time, the latter also returning an associated code value. GET_PRIMARY_ZONE returns the primary timezone for a given location or context. GET_TIMEZONE_SHORT_CODE returns the abbreviated short code designation for a timezone. GET_BEGIN_END_DST_DAY_TIME returns the begin and end day and time of daylight saving observance for a given timezone. GET_DATE_FROM_W_AND_D derives a date value from a weekday and day specification. Parameter lists are not documented in the available metadata and are therefore not reproduced here.

Tables Accessed

The package body reads from several application tables accessed through APPS synonyms. FND_TIMEZONES_B and FND_TIMEZONES_VL supply the base and translated timezone definitions maintained by the common FND timezone infrastructure; FND_TIMEZONE_PUB is also referenced by the body for the underlying timezone API logic. HZ_TIMEZONES and HZ_TIMEZONES_VL provide the Trading Community timezone base and translation tables. HZ_TIMEZONE_MAPPING stores the mapping relationships used to translate between timezone representations. HZ_PHONE_AREA_CODES and HZ_PHONE_COUNTRY_CODES supply the telephone area code and country code data used by GET_PHONE_TIMEZONE_ID. Dependencies also include ARP_UTIL, which indicates reuse of existing receivables-side utilities for common lookup processing. The package body is documented as not referenced by any other database object, meaning it is a leaf consumer of these tables rather than a dependency target.

Usage Notes

HZ_TIMEZONE_PUB is typically invoked through forms, concurrent programs, and custom PL/SQL code whenever a local time must be normalized to GMT or when a timezone must be inferred from an address or phone number. Because the body is referenced by 51 other packages, callers should treat it as a shared service whose results are consistent across the application. Errors are surfaced through the FND message stack rather than by raw exceptions, so calling code should check the standard API return status and inspect FND_MSG_PUB messages. The package performs read-only resolution against the documented tables; it does not maintain timezone data itself. Administrators must therefore keep FND_TIMEZONES_B, HZ_TIMEZONES, and HZ_TIMEZONE_MAPPING current so that DST boundary queries and offset calculations remain accurate. The presence of both FND and HZ timezone tables means callers should prefer this public package over direct table queries to preserve forward compatibility with future releases.