in [ ]df['tz_info'df['ts_obj'apply(lambda dd tzinfodf['timezones'df['ts_obj'apply(lambda dlist({ astimezone(tztzname(for tz in map(pytz timezonepytz all_timezones_setif astimezone(tzutcoffset(= utcoffset()})df[['time''utc_offset''tz_info''timezones']figure - time zone relevant features in temporal data thus as we mentioned earlierthe features depicted in figure - show some of the attributes pertaining to time zone relevant information for each temporal value we can also get time components in other formatslike the epochwhich is basically the number of seconds that have elapsed since january (midnight utcand the gregorian ordinalwhere january st of year is represented as and so on the following code helps us extract these representations see figure - in [ ]df['timeutc'df['ts_obj'apply(lambda dd tz_convert(pytz utc)df['epoch'df['timeutc'apply(lambda dd timestamp()df['gregordinal'df['timeutc'apply(lambda dd toordinal()df[['time''timeutc''epoch''gregordinal']figure - time components depicted in various representations do note we converted each temporal value to utc before deriving the other features these alternate representations of time can be further used for easy date arithmetic the epoch gives us time elapsed in seconds and the gregorian ordinal gives us time elapsed in days we can use this to derive further features like time elapsed from the current time or time elapsed from major events of importance based on the problem we are trying to solve let' compute the time elapsed for each temporal value since the current time see figure - in [ ]curr_ts datetime datetime now(pytz utccompute days elapsed since today df['dayselapsedepoch'(curr_ts timestamp(df['epoch']( * df['dayselapsedordinal'(curr_ts toordinal(df['gregordinal']df[['time''timeutc''dayselapsedepoch''dayselapsedordinal']