apod-api icon indicating copy to clipboard operation
apod-api copied to clipboard

Missing info: at what time "today's" image is created?

Open EmmanueleVilla opened this issue 6 years ago • 2 comments

As per title, when the change in what day is "today" happens? Looking at the code, it seems that datetime.today().date() returns the local datetime, so what local is that?

EmmanueleVilla avatar Jul 30 '19 08:07 EmmanueleVilla

I believe this code is run local to Eastern US time, however its been years since I checked this.

=brian

From: Emmanuele Villa [email protected] Reply-To: nasa/apod-api [email protected] Date: Tuesday, July 30, 2019 at 4:54 AM To: nasa/apod-api [email protected] Cc: Subscribed [email protected] Subject: [EXTERNAL] [nasa/apod-api] Missing info: at what time "today's" image is created? (#26)

As per title, when the change in what day is "today" happens? Looking at the code, it seems that datetime.today().date() returns the local datetime, so what local is that?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_nasa_apod-2Dapi_issues_26-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAA6NHGOSONVL4PVIW4T3E7LQB76U5A5CNFSM4IHZ7RMKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HCHVBJA&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=BZpo7Ra1k7-CMa5_b1wFxVw3bMQgOLcmuYgw3r1v4sI&m=8SEl0xAjFlJ-HzpB8SJQ_zke6O7V9e_VyF3UVMvfcz8&s=dW7CWiFtWpPrfssLskFr_VZ5zO-olMaH1rOtr0CLLTo&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AA6NHGJQ6CKLQVBE5ZGE2VDQB76U5ANCNFSM4IHZ7RMA&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=BZpo7Ra1k7-CMa5_b1wFxVw3bMQgOLcmuYgw3r1v4sI&m=8SEl0xAjFlJ-HzpB8SJQ_zke6O7V9e_VyF3UVMvfcz8&s=7GTFi7q31BAwZeGzcFPH_kOBJ4nkXKprjqWL3Nm_ul8&e=.

brianthomas avatar Aug 01 '19 13:08 brianthomas

To double check this, I set up automated tests for my wrapper to run every 30 minutes over night, starting from minute 15. The tests started failing when my local time passed 00:00 and started working again at 04:00 UTC, so the APOD seems to be published at 00:00 UTC-4 (Eastern Time).

Last failing test (03:46:49 UTC) First passing test (04:16:38 UTC)

Perhaps the time zone information should be added to the README.

EDIT: Remember DST.

Time period start Time period end Time of publication
Second Sunday in March First Sunday in November 00:00 UTC-04:00
First Sunday in November Second Sunday in March 00:00 UTC-05:00

MarcusOtter avatar Oct 31 '19 15:10 MarcusOtter