Description:
no easy way to get the timezone from a date field
would like a
%Z alphabetic time zone abbreviation (e.g., EDT)
currently using
mysql> select time_zone_transition_type.Abbreviation from time_zone_transition_type, time_zone_name where time_zone_name.Name='US/Eastern' and time_zone_name.Time_zone_id=time_zone_transition_type.Time_zone_id and time_zone_transition_type.Transition_type_id=(select time_zone_transition.Transition_type_id from time_zone_transition, time_zone_name where time_zone_name.Name='US/Eastern' and time_zone_name.Time_zone_id=time_zone_transition.Time_zone_id and time_zone_transition.Transition_time<UNIX_TIMESTAMP(CONVERT_TZ('2006-04-02 03:00:00', 'US/Eastern', 'UTC')) order by time_zone_transition.Transition_time desc limit 1);
+--------------+
| Abbreviation |
+--------------+
| EST |
+--------------+
1 row in set (0.00 sec)
mysql> select time_zone_transition_type.Abbreviation from time_zone_transition_type, time_zone_name where time_zone_name.Name='US/Eastern' and time_zone_name.Time_zone_id=time_zone_transition_type.Time_zone_id and time_zone_transition_type.Transition_type_id=(select time_zone_transition.Transition_type_id from time_zone_transition, time_zone_name where time_zone_name.Name='US/Eastern' and time_zone_name.Time_zone_id=time_zone_transition.Time_zone_id and time_zone_transition.Transition_time<UNIX_TIMESTAMP(CONVERT_TZ('2006-04-02 03:00:01', 'US/Eastern', 'UTC')) order by time_zone_transition.Transition_time desc limit 1);
+--------------+
| Abbreviation |
+--------------+
| EDT |
+--------------+
How to repeat:
feature request