SPSS datetime values lack timezone metadata: how to handle regional conversions?
0 reputation · 13 Dec 2024, 05:06 UTC
Problem Statement
SPSS stores datetime values as seconds since 1582‑10‑14 without any timezone information. Built‑in functions assume the value represents local wall‑clock time, and no automatic daylight saving time (DST) adjustments are applied. When importing timestamps from sources with explicit time zones (e.g., PostgreSQL TIMESTAMPTZ) the resulting SPSS value is a naive local‑time representation, which can lead to duplicate or missing hour values during DST transitions.
Goal
Determine a reliable method to convert timezone‑aware timestamps into SPSS datetime variables that preserves the original UTC instant, correctly resolves DST boundaries, and avoids ambiguous times.
Unresolved Decision
SPSS offers no native SET TIMEZONE or similar command. Users must manually compute UTC offsets or use external extensions, but it is unclear whether a consistent, reproducible approach exists for cross‑regional datasets.
Specific Questions
- What is the recommended SPSS syntax or extension to apply a UTC offset to a datetime variable while accounting for DST transitions?
- Can the SPSSINC TRANS extension reliably convert a TIMESTAMPTZ value from a database into a SPSS datetime that reflects the correct UTC instant?
- Is there a documented procedure to flag or detect duplicate/missing hour values in a datetime series that crosses a DST boundary?