LW039 Timestamp conversion that loses or invents its time zone

Severity: WarningFree

A cast, TO_TIMESTAMP_*, TO_DATE or TO_TIME drops a TIMESTAMP_TZ offset or takes the zone from the session, a two-argument CONVERT_TIMEZONE reads a TIMESTAMP_NTZ or DATE in the session’s zone, a three-argument CONVERT_TIMEZONE converts a TIMESTAMP_LTZ, whose wallclock time it reads in the session’s zone, or a TIMESTAMP_LTZ_FROM_PARTS or TIMESTAMP_TZ_FROM_PARTS is called without its time_zone. A TIMESTAMP_TZ known to hold UTC may be cast to TIMESTAMP_NTZ.

How it scores

Debugging time saved
Impact
Time to detection
Complexity

Our estimates, from 1 to 5, not measurements. Compare it with the other 53 codes →

Part of

Also in “Time zones taken from the session”

Install free →All 54 diagnostic codes