What are the fastest ways to convert unix timestamp to local unix timestamp inside a tf.Module. The inputs include timestamp, timezone
that are defined as below:
timestamp = tf.constant([1665397419, 1665397419, 1665397419], dtype=tf.int64)
timezone = tf.constant(["America/Los_Angeles", "America/Montreal", "Europe/Helsinki"])
The tf module will have structure like this:
class LocalTime(tf.Module):
def __init__(self):
def __call__(self, ts, tz): #timestamp and timezone
# Do something
return ts_local # local timestamp
Expected output:
local_time = [1665372219, 1665383019, 1665408219]