-
Notifications
You must be signed in to change notification settings - Fork 276
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
No hard-coded, sprinkled, 1996! #51
Comments
Adding interested parties from spreadsheet. @kris-sigur @anjackson @PsypherPunk |
Here are the remaining references to 1996 that I can find: https://github.com/iipc/openwayback/blob/master/wayback-core/src/main/java/org/archive/wayback/util/Timestamp.java#L42 I'm looking into reusing the |
I have started to look into this issue, and am trying to figure out the code in Timestamp.java. One of the things that puzzles me is the definition of several MAX MIN limits: private final static String MONTH_LOWER_LIMIT = "01"; Does anybody have situations where these variables could be set differently than the above? If not why isn't simply the Calendars getMaximum() and getMinimum() methods used to test whether date strings are legal or not |
One thing to consider when making the start year configurable, is how to configure. So far I have implemented a solution that uses a system parameter to set the default start date from the JVM command line eg: "-Dwayback.timestamp.startyear=1997". Another possible solution would be to put the configuration in a .properties under /src/main/resources/org/archive/wayback/util (Or perhaps allow for both?). |
It all seems to come down to the boundTimestamp method that is used for validation. It seems to me that this class should really be rewritten so that it uses a suitable utility method from DateUtils to convert the timestamp string into a Date object. Same issue in method dateStrToCalendar. I guess the good news is that none of these constants are used outside of Timestamp.java. |
On the configuration front, make sure its configurable via the wayback.xml. Allowing a -D override is good too. |
Thanks Kris, if you need a use case why. I am moving towards one big index, as I get space, but I still need "collections" that are bounded by dates for which I use the wayback.xml prop. |
Sounds like maybe the date limits should be defined per access point. |
Thinking about the implications of changing this. It seems like an API change and we should move this to 2.1.0. |
There are other elements we define using the access point, to include a change of template and auth by access point for off-site access, which I need to get back to testing. I have that set up in 1.6 but haven't yet figured it out in OW. |
I have now made changes to the Timestamp class so that the start date is configurable and the configuration can be reached from other parts of the code. So far I have also modified the .jsp pages refered in Erik Hetzners post so that they make use of the dynamically set start year. I also have made modifications that calculates the end (current) year on every request instead of on instance startup. This should take care of the problems that arises when an instance is up and running through new years. The modifications made might also have fixed the problems in issue #86, but we have not been able to verify this. I have pushed the new code to the nlnwa copy of Openwayback, and are planning to make a pull request for it into the iipc codebase. The Timestamp modifications are as follows:
|
I also tried to locate a relevant CHANGES.md (webarchive-commons has one) to enter the modifications, but could not find such file in OpenWayback Core. The modifications should perhaps not be added until a pull request is accepted? |
@RogerMathisen Please note changes in https://github.com/iipc/openwayback/blob/master/src/site/xdoc/release_notes.xml and include it as part of the pull request, as per this wiki page: https://github.com/iipc/openwayback/wiki/How-to-contribute |
Move to Spring?
The text was updated successfully, but these errors were encountered: