taxonworks icon indicating copy to clipboard operation
taxonworks copied to clipboard

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

Open AntWeb-org opened this issue 1 year ago • 6 comments

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)

AntWeb-org avatar Feb 10 '24 00:02 AntWeb-org

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: @.***>

LocoDelAssembly avatar Feb 10 '24 00:02 LocoDelAssembly

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

AntWeb-org avatar Feb 10 '24 01:02 AntWeb-org

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

mjy avatar Feb 25 '24 15:02 mjy

Yes, it's setting on client side

jlpereira avatar Feb 25 '24 15:02 jlpereira

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

mjy avatar Feb 25 '24 17:02 mjy

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.

LocoDelAssembly avatar Feb 26 '24 20:02 LocoDelAssembly