postgresql - postgres daylight savings timezone -
i have postgres table column timestamp timezone. data stored in utc. want convert column utc different time zones. how select correct timezone take daylight savings account in postgres? have had @ pg_timezone_names view , aware of actual supported abbrev postgres. concern states california use pst , pdt parts of year.
i suspect, code select current_time @ time zone 'pdt'
, or select current_time @ time zone 'pst'
won't give me correct current time in california year. have understood right?
i aware sometime select current_time @ time zone 'america/new_york'
or america/los_angeles
. expect take account day light savings time have explicitly specified location. correct way handle daylight savings issue in postgres?
ideally, not want specify locations explicitly , have preferred go postgres timezone abbreviation. can done @ all?
i have same question you. best can offer point documentation page, found. pg_timezone_names documentation
the view pg_timezone_names provides list of time zone names recognized set timezone, along associated abbreviations, utc offsets, , daylight-savings status. unlike abbreviations shown in pg_timezone_abbrevs, many of these names imply set of daylight-savings transition date rules. therefore, associated information changes across local dst boundaries. displayed information computed based on current value of current_timestamp.
i think makes sense , best can hope for. time zone abbreviations unfortunately not encompass dst rules, think because no specific geographic region can implied, therefore symbols utc offsets.
Comments
Post a Comment