jaraco / tempora

MIT License
20 stars 5 forks source link

documentation on how to use with time zone #15

Closed numberonewastefellow closed 3 years ago

numberonewastefellow commented 3 years ago

i'm using existing python schedule package, but i was looking for time zone support. i want to run job every day at 8 am in timezone('Asia/Calcutta'). but production servers in different timezone (UTC or Asia/Dubai or any other timezone). so jobs are executing on local time zone(server). after doing some search i found this library has timezone support. But I'm not sure how to use.

import schedule
import time

def job(t):
    print "I'm working...", t
    return

schedule.every().day.at("08:00").do(job,'It is 08:00')

while True:
    schedule.run_pending()
    time.sleep(60) # wait one minute

how tempora will support time zone? is there any examples, schedule.every().day.at("08:00").do(job,'It is 08:00') where to set timezone?

jaraco commented 3 years ago

I've added these docs, based on your example case. I believe that answers the question. Thanks for asking!