Jump to content

For Pete's sake! PLEASE fix your date code!!


the Seagnoid

Recommended Posts

Groundspeak seem to have repeated their date library all over the place, and many of these libraries give different results. I am going to be generous and say this was intentional, but I can't for the life of me think why.

 

So for reference, I am in New Zealand, which is UTC +12 or +13. Yes, this is all about timezone handling.

 

"Ordinary" geocaching... works perfectly.

Souvenirs - often awarded in the future - I qualify for a souvenir today but the date that is attached to the souvenir is tomorrow's date.

Labs in the leader board come in on the wrong date (can't remember if it is yesterday or tomorrow)

I know there are others, but I can't remember them at the moment. If I find them again I'll add a note to this thread.

 

For instance, I was awarded the GCHQ souvenir on the 21 August 2022. The qualifying find was on the 20th. Once Upon a Time 2022 on 2 January despite finding a cache on the 1 January

 

Good programming practice would be to have one date library, probably stored in your SQL server. Okay, I can understand that might need to replicated, but that should be avoided like the plague, but where it must replicated but could you please at least use the same logic?

 

For reference the date a cache (including lab cache) is found should be based on the timezone that the cache is located in (locationless caches might need special handling). Awards, such as souvenirs, should use the date of the qualifying cache, or at least use the most recent date in the finders stats, and certainly not tomorrow's date!

 

Incidentally this is a common problem - in that every time Groundspeak release a new feature, time zone handling is incorrect, at least it is for those of us that live this close to the dateline. I  recommend that Groundspeak get a tester in New Zealand or Australia to test their timezone handling prior to new products being released. Or maybe set up a VM user client with UTC +13 for testing (and test for finds just before and just after midnight).

 

 

  • Upvote 3
  • Funny 1
  • Helpful 2
Link to comment
6 hours ago, the Seagnoid said:

Incidentally this is a common problem - in that every time Groundspeak release a new feature, time zone handling is incorrect, at least it is for those of us that live this close to the dateline.

It's not just a problem near the dateline.  I'm in the same timezone as geocaching.com's headquarters, UTC-7.  Yesterday evening, well before midnight, I logged an Adventure Lab cache and obtained a souvenir, but both are shown with today's date.  I also logged 2 ordinary caches, which correctly showed yesterday's date.

Edited by Nylimb
  • Helpful 3
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...