ddsky / world-news-api-clients

MIT License
7 stars 2 forks source link

how to specify the time zone #10

Closed charliedream1 closed 1 week ago

charliedream1 commented 1 week ago

I want to search news in realtime. However, I found I can't specify the time zone for search, and all the news time with different time zone. I might miss some news if I use local time to extract news every hour.

  1. So what is the max latency should I use for real time acquisition?
  2. What is the time zone used in publish time?
ddsky commented 1 week ago
  1. Max latency is 24 hours but realistically it is minutes to a few hours after being published
  2. We always try to get UTC but sometimes the source does not specify that.

You could simply sort descending by publish-time to make sure you get the latest news.

Also, I recommend using the discord for questions like these: https://discord.gg/GrmNknKHYD

charliedream1 commented 1 week ago

Thanks

---Original--- From: "David @.> Date: Mon, Oct 14, 2024 01:30 AM To: @.>; Cc: "Optimus @.**@.>; Subject: Re: [ddsky/world-news-api-clients] how to specify the time zone(Issue #10)

Max latency is 24 hours but realistically it is minutes to a few hours after being published

We always try to get UTC but sometimes the source does not specify that.

You could simply sort descending by publish-time to make sure you get the latest news.

Also, I recommend using the discord for questions like these: https://discord.gg/GrmNknKHYD

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

charliedream1 commented 1 week ago

For latency, do you mean UTC time?So If I sample with UTC - 24(hours), then I won't miss any news?

天天高兴! @.***

 

------------------ 原始邮件 ------------------ 发件人: "ddsky/world-news-api-clients" @.>; 发送时间: 2024年10月14日(星期一) 凌晨1:30 @.>; @.**@.>; 主题: Re: [ddsky/world-news-api-clients] how to specify the time zone (Issue #10)

Max latency is 24 hours but realistically it is minutes to a few hours after being published

We always try to get UTC but sometimes the source does not specify that.

You could simply sort descending by publish-time to make sure you get the latest news.

Also, I recommend using the discord for questions like these: https://discord.gg/GrmNknKHYD

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

ddsky commented 1 week ago

For latency, do you mean UTC time?So If I sample with UTC - 24(hours), then I won't miss any news? 天天高兴! @.   ------------------ 原始邮件 ------------------ 发件人: "ddsky/world-news-api-clients" @.>; 发送时间: 2024年10月14日(星期一) 凌晨1:30 @.>; @*.**@*.>; 主题: Re: [ddsky/world-news-api-clients] how to specify the time zone (Issue #10) Max latency is 24 hours but realistically it is minutes to a few hours after being published We always try to get UTC but sometimes the source does not specify that. You could simply sort descending by publish-time to make sure you get the latest news. Also, I recommend using the discord for questions like these: https://discord.gg/GrmNknKHYD — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

correct

charliedream1 commented 1 week ago

Thx

---Original--- From: "David @.> Date: Mon, Oct 14, 2024 23:27 PM To: @.>; Cc: "Optimus @.**@.>; Subject: Re: [ddsky/world-news-api-clients] how to specify the time zone(Issue #10)

For latency, do you mean UTC time?So If I sample with UTC - 24(hours), then I won't miss any news? 天天高兴! @.   … ------------------ 原始邮件 ------------------ 发件人: "ddsky/world-news-api-clients" @.>; 发送时间: 2024年10月14日(星期一) 凌晨1:30 @.>; @.@.>; 主题: Re: [ddsky/world-news-api-clients] how to specify the time zone (Issue #10) Max latency is 24 hours but realistically it is minutes to a few hours after being published We always try to get UTC but sometimes the source does not specify that. You could simply sort descending by publish-time to make sure you get the latest news. Also, I recommend using the discord for questions like these: https://discord.gg/GrmNknKHYD — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

correct

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

charliedream1 commented 6 days ago

for returned parameter publish_date, is it the news actual publish time writen in the news, or is it the time you logged into the database?

And the publish_date might be of any time zone, it's not a fixed time zone?

ddsky commented 6 days ago

that's the actual publish time specified by the source. It can be any time zone, because the news could come from Australia and if they just write "October 15th, 8:50am" we have to take that time. Sometimes that do write it with UTC offsets though.

charliedream1 commented 6 days ago

Thx 4 your reply

---Original--- From: "David @.> Date: Tue, Oct 15, 2024 16:58 PM To: @.>; Cc: "Optimus @.**@.>; Subject: Re: [ddsky/world-news-api-clients] how to specify the time zone(Issue #10)

that's the actual publish time specified by the source. It can be any time zone, because the news could come from Australia and if they just write "October 15th, 8:50am" we have to take that time. Sometimes that do write it with UTC offsets though.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>