SpeciesFileGroup / taxonworks

Workbench for biodiversity informatics.
http://taxonworks.org
MIT License
87 stars 26 forks source link

[Bug]: Filter collection objects: houskeeping date is off by a day #3818

Open AntWeb-org opened 9 months ago

AntWeb-org commented 9 months ago

Steps to reproduce the bug

I want to filter collection objects entered on today's date - (February 9, 2024)
1.Task-Filter Collection Objects
2.Scroll to Housekeeping
3.Select a name and click Created at
4.Click Now button to bring up options
5.Click Today button
The date autofilled is tomorrow's date - February 10, 2024
If I click Yesterday the range is today/tomorrow.
...

Screenshot

image

Expected behavior

When I choose Today for a date, the date should reflect the day I am currently in. Not sure if it's a time zone issue.

Additional Screenshots

No response

Environment

Production

Sandbox Used

No response

Version

v0.38.2

Browser Used

Chrome Version 121.0.6167.161 (Official Build) (64-bit)

LocoDelAssembly commented 9 months ago

If the data was recorded in the last 3 to 6 hours (or maybe more) then it might be that in UTC time it is February 10 already. Housekeeping uses UTC time IIRC.

El vie, 9 de feb de 2024, 21:42, AntWeb-org @.***> escribió:

Steps to reproduce the bug

I want to filter collection object entered on today's date - (February 9, 2024)1.Task-Filter Collection Objects2.Scroll to Housekeeping3.Select a name and click Created at4.Click Now button to bring up options5.Click Today buttonThe date autofilled is tomorrow's date - February 10, 2024 If I click Yesterday the range is today/tomorrow. ...

Screenshot

image.png (view on web) https://github.com/SpeciesFileGroup/taxonworks/assets/74991451/c77512c4-b7df-4e5a-9af7-93823fc18c92 Expected behavior

When I choose Today for a date, the date should reflect the day I am currently in. Not sure if it's a time zone issue. Additional Screenshots

No response Environment

Production Sandbox Used

No response Version

v0.38.2 Browser Used

Chrome Version 121.0.6167.161 (Official Build) (64-bit)

— Reply to this email directly, view it on GitHub https://github.com/SpeciesFileGroup/taxonworks/issues/3818, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGCXNLODYG75JSYI5WIS3LYS267BAVCNFSM6AAAAABDCIYIF2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZDQMBRGQ2TSNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

AntWeb-org commented 9 months ago

If there's any way to alter our project to reflect PST that would be great.

mjy commented 8 months ago

@jlpereira this could be a real bug, that time setting is client side right?

jlpereira commented 8 months ago

Yes, it's setting on client side

mjy commented 8 months ago

So it should match client date-time and we worry about chaning to utc on server side I think?

LocoDelAssembly commented 8 months ago

I think it is the browser who knows the time offset, so it could submit UTC to backend so dates can still be compared without any on-the-fly adjustments.

OTOH since unified filters are somewhat link-shareable, it is also true that perhaps a time offset should be a param that client sets and then let middleware or controller convert to UTC.