[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Identify snapshot based on Release file Date:



On Mon, 15 Aug 2016, Paul Wise wrote:

> The Date field from the Release files is not imported into the database AFAICT.

> > Assuming that everything is nicely in sync, it should be the snapshot
> > NEXT after the one snapshot.d.o would redirect me to if I simply enter
> > that date in url, since it would "round down". E.g. if I have Release
> > file from
> > http://snapshot.debian.org/archive/debian/20091002T164800Z/dists/sid/
> > which contains date
> > Fri, 02 Oct 2009 15:22:39 UTC ==  20091002T112239Z, so if I go to

> I think you made a typo there? s/T11/T15

yes... I have not spotted that my timestamp conversion code managed to
"respect" my timezone.  THANK YOU for spotting it out, fixed now

> ...
> The best you can currently get is to add two hours on to the time:

> $ GET http://snapshot.debian.org/archive/debian/20091002T172239Z/dists/sid/Release
> | grep Date
> Date: Fri, 02 Oct 2009 15:22:39 UTC
> $ HEAD -S http://snapshot.debian.org/archive/debian/20091002T172239Z/dists/sid/
> | head -n4
> HEAD http://snapshot.debian.org/archive/debian/20091002T172239Z/dists/sid/
> 301 Moved Permanently
> HEAD http://snapshot.debian.org/archive/debian/20091002T164800Z/dists/sid/
> 200 OK

> Or maybe parse the HTML:

> $ GET http://snapshot.debian.org/archive/debian/20091002T152239Z/dists/sid/
> | grep -i 'next'
>         <acronym title="2009-10-02 16:48:00"><a
> href="/archive/debian/20091002T164800Z/dists/sid/">next</a></acronym>
>             <acronym title="2009-10-02 16:48:00"><a
> href="/archive/debian/20091002T164800Z/dists/sid/">next
> change</a></acronym>

yeah, I guess quick parsing the html would be the way to go (for now at
least)

> > So I wondered if there is any client API (i.e. without looking to the
> > DB, or scraping dates/urls from month(s) views) to jump to the
> > "rounded up/ceiling" snapshot, not down?  or may be just to the 'next'
> > from the current one?

> There isn't an API for that yet:
> https://anonscm.debian.org/cgit/mirror/snapshot.debian.org.git/plain/API

Thank you for the pointer Paul.
-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        


Reply to: