Jul-02-2023, 10:59 PM
ok. I'm staying with the UTC timestamp. UTC timestamp has no time zone.
Is the snippet below creates the correct UTC time-based filter of 24 hours period?
Could you confirm whether it is correct or not?
Thank you.
Is the snippet below creates the correct UTC time-based filter of 24 hours period?
#start_time = datetime.combine(date.today(), time(), tzinfo=timezone("US/Pacific")) start_time = datetime.combine(date.today(), time(), tzinfo=timezone("Asia/Kuala_Lumpur")) end_time = start_time + timedelta(hours=24) print(start_time, end_time) # Convert to timestamps. start_time = start_time.timestamp() end_time = end_time.timestamp() print(start_time, end_time)
Could you confirm whether it is correct or not?
Thank you.