New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date error when logging caches #14746
Comments
@eddiemuc |
Yes, there is a difference. While with the old API only the day is submitted (Year, month, day), in the new API a timestamp is submitted (year, month, day, hour, minute, second, ms). I thought that this issue is yet another reincarnation of the well-known problem of c:geo with timezones. Is this not the case? |
Before we do have problems "the other way around"...e.g. showing a logbook date in c:geo without respecting time zone might lead to wrong date in c:geo. |
I won't be able to provide a "fix" for this during next days. Should be fairly easy to do for anyone though. The key method is in class If it is enough to throw away the time info then instead of the incoming log date a new date should be created using only the year-month-day-info from this date and the time set to 00:00:00. |
I was able to reproduce and confirm this bug.
Example: I test-logged a cache today around 9:45 german time (GMT+2) first on website then on c:geo
I am not very firm with timezones, how should this be handled. Should we send local time too? If yes, which local time? That of the timezone where the cache is located (how would I get that?) or the timezone where the current user (resp his mobile) is currently located (where would I get that?). Or is there a way to tell JSON that the given time is GMT? To be tested whether gc.com would handle this correctly though... |
Some more questions:
|
Another user on support reporting this. This user is in the US, MDT timezone. "I have notice an issue when I am logging caches through the app I am in the US and as I log the caches it puts the date one day ahead of when I found the cache. Ticket 903980 |
Timestamp part should stay, so the order of logs of the day remain the same, and I don't have to consider sending order.
For me it would be the creation-time stamp, because normally I create the log on log-time and send it later. So the log-time-zone would be the one of creation-Moment. |
PR #14774 changes json serialization to use local timezone instead of UTC (which apparently is the default for Jackson Json). Behaviour should now be the same as before in the "old" way, except that time-part is added.
The overall timezone topic is not solved by this (nor was it before), this remains to be discussed at another point in time. |
NB: gc.com itself handles timezones wrong IMHO, because in its json requests it uses the |
Is the jackson lib only used for GC? I'm wondering whether it's a good approach to change timestamp parsing behavior globally in cgeo... |
I scanned code, apparently the new log API is the only one using the global mapper of JsonUtils as well as date/timestamp fields with Jackson. Also, c:geo widely uses |
Describe your problem!
I logged a cache this evening, around 10pm. I notice that even though I have the current date selected in c:geo, the Geocaching website shows the logged date as tomorrow. My time zone is GMT-4. I went back to c:geo and it said that I had found it on the current date, but upon refreshing the cache in c:geo, it updates to match the incorrect date on the Geocaching website. I first noticed this issue after updating to 2023.10.15-RC2.
Edit: it did it again today when I logged the cache just after 9pm EDT.
How to reproduce?
Log a cache after a certain time of day. I'm not sure what time that is yet.
Actual result after these steps?
The found date in c:geo shows the current date, but the Geocaching website shows tomorrow as the date logged.
Expected result after these steps?
The found date listed on the Geocaching website should match the date selected in c:geo.
Reproducible
Yes
c:geo Version
2023.10.15-RC2
System information
Additional Information
Also reported on support, eg ticket 496584
The text was updated successfully, but these errors were encountered: