IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 23, 2018, 4:52:59 PM (8 years ago)
Author:
watersc1
Message:

Fixed end-of-night date calculation. Should now trigger automatically at 7:30AM HST

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/nightly_science.pl

    r40393 r40403  
    4646
    4747# Grab options
    48 my ( $date, $datetime, $camera, $dbname, $logfile, $verbose, $manual);
     48my ( $date, $datetime, $now, $camera, $dbname, $logfile, $verbose, $manual);
    4949my ( $help, $isburning, $force_stack_count, $force_diff_count, $force_registration, $test_mode, $this_target_only, $this_filter_only, $this_mode_only, $check_mode);
    5050my ( $registration_status, $burntool_status, $observing_status, $old_date);
     
    256256    $date = $datetime->ymd();
    257257}
     258$now = DateTime->now(time_zone => 'UTC');
    258259
    259260if (defined($this_target_only)) {
     
    21182119                                month  => $datetime->month,
    21192120                                day    => $datetime->day,
    2120                                 hour   => 6,
     2121                                hour   => 17, # 7,
    21212122                                minute => 30,
    21222123                                second => 0,
    2123                                 time_zone => 'Pacific/Honolulu');
     2124                                time_zone => 'UTC');
    21242125   
    21252126    foreach my $eon (keys %eon_config) {
     
    21462147        return("END_OF_NIGHT");
    21472148    }
    2148 #    print "$datetime $eon_dt\n";
    2149     if (DateTime->compare($datetime,$eon_dt) < 1) {
     2149#    print "$now $eon_dt " . DateTime->compare($now,$eon_dt) . "\n";
     2150    if (DateTime->compare($now,$eon_dt) < 1) {
    21502151        return("OBSERVING");
    21512152    }
Note: See TracChangeset for help on using the changeset viewer.