Aleksey Kostitsun
Aleksey Kostitsun

Reputation: 1

How do I transfer the time from the local time zone to a specific one?

I want to execute the function at 08:00 Yerevan time, but by default it will be executed at 08:00 local time, depending on the location of the server. In the future, my server will be moved to different parts of the world several times, so I need to configure everything so that the function is performed exactly at 08:00 Yerevan time

if __name__ == "__main__":
    schedule.every().day.at('08:00').do(function_to_run)
    Thread(target=schedule_checker).start()

I have tried using different libraries such as pytz, but each time I came across the need to specify the original time zone. That is, it looked like: "well-defined time zone 1" > "well-defined time zone 2". But I need it like this: "local time zone" > "well-defined time zone"

Upvotes: 0

Views: 37

Answers (0)

Related Questions