Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Mismatch search and publish time algorythms #3019

Closed
dioteos opened this Issue · 3 comments

4 participants

@dioteos

I started my local npm registry, all working fine but I found next problem
When I publish some package in my repository - package modified date is calculated as
Date#toISOString()

And when I try to search through my repository date is calculated as
Date#toLocaleString()

So, newest version of npm package is not showed in my search results because updates are fetching from
_design/scratch/_rewrite/-/all/since?stale=update_after&startkey=Date#toLocaleString()
but should be fetched from
_design/scratch/_rewrite/-/all/since?stale=update_after&startkey=Date#toISOString()

For those users who live in negative time offset zones all works, because
Date#toLocaleString() < Date#toISOString()

But in my case we have opposite situation.

By now for seeing any changes on my private repo I need to clean my cache folder every time when I need to retrieve updates from my registry.

We need to synchronize in some way date calculations algorythms.

@nathan7
Collaborator

I don't see a single instance of toLocaleString in the source. I'll see if I can find the source of this.

@nathan7
Collaborator

As far as I can tell, the updated value in the cache comes from the registry and are UNIX timestamps (which are timezone-agnostic)

@timoxley
Collaborator

@dioteos is this still an issue? if not, can you close this?

#4430

@iarna iarna closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.