Index: trunk/pstamp/scripts/pstampparse.pl
===================================================================
--- trunk/pstamp/scripts/pstampparse.pl	(revision 38117)
+++ trunk/pstamp/scripts/pstampparse.pl	(revision 38124)
@@ -528,4 +528,22 @@
         # avoid error from print below if $id isn't needed
         $row->{ID} = "" if !$row->{ID};
+
+        # if this user does not have unlimited access rights adjust the date cut
+        # to avoid more recent data
+        my $mjd_max;
+        # We do not adjust dates for stacks since they are not well defined enough.
+        # We'll need to filter them by accessLevel during the lookup
+        if ($stage ne 'stack' and adjustDateCuts($row, \$mjd_max)) {
+            # if lower limit was supplied by user we can leave the value alone
+            if ($row->{MJD_MAX}) {
+                if ($row->{MJD_MAX} > $mjd_max) {
+                    print STDERR "Access rights require limiting MJD_MAX to $mjd_max\n";
+                    $row->{MJD_MAX} = $mjd_max;
+                }
+            } else {
+                # no limit supplied we silently adjust it
+                $row->{MJD_MAX} = $mjd_max;
+            }
+        }
     }
     
@@ -1225,5 +1243,5 @@
 
     my $MJD_PS1_BEGIN = 54922;    # 2009-04-01
-    my $MJD_PS1_END   = 56838;    # 2014-06-30      XXX get the actual date
+    my $MJD_PS1_END   = 57082;    # 2015-03-01
 
     if ($row->{accessLevel} == 1) {
