Mismatch search and publish time algorythms #3019

Closed
dioteos opened this Issue Dec 25, 2012 · 3 comments

Comments

Projects
None yet
4 participants

dioteos commented Dec 25, 2012

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.

Contributor

edef1c commented Dec 25, 2012

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

Contributor

edef1c commented Dec 26, 2012

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

Member

timoxley commented Jan 7, 2014

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

#4430

iarna closed this Sep 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment