Consider a list of posix time stamps
posix_times = [1490750889, 1490751209, 1490751569]
I would like to convert each element in the array to a text string containing the local date and time in the US/Pacific time zone:
["3/28/2017 18:28:09", "3/28/2017 18:33:29", "3/28/2017 18:39:29"]
What is the simplest way to do this which requires a minimum of package imports?
A related problem was addressed in Converting unix timestamp string to readable date in Python, which offers, for example a solution of the form:
posix_time = 1490750889
datetime.datetime.utcfromtimestamp(posix_time).strftime('%Y-%m-%dT%H:%M:%SZ')
which does not offer the explicit ability to convert this time to another time zone. Also, it appears that such a method does not work on lists and would require a for loop/list comprehension.